OSDN Git Service
(root)
/
midichordhelper
/
MIDIChordHelper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
リファクタリング
[midichordhelper/MIDIChordHelper.git]
/
src
/
camidion
/
chordhelper
/
anogakki
/
AnoGakkiPane.java
diff --git
a/src/camidion/chordhelper/anogakki/AnoGakkiPane.java
b/src/camidion/chordhelper/anogakki/AnoGakkiPane.java
index
0d11298
..
61d01e3
100644
(file)
--- a/
src/camidion/chordhelper/anogakki/AnoGakkiPane.java
+++ b/
src/camidion/chordhelper/anogakki/AnoGakkiPane.java
@@
-222,13
+222,7
@@
public class AnoGakkiPane extends JComponent {
Graphics2D g2 = (Graphics2D)g;
g2.setStroke(stroke);
g2.setColor(color);
Graphics2D g2 = (Graphics2D)g;
g2.setStroke(stroke);
g2.setColor(color);
- synchronized(queue) {
- Iterator<QueueEntry> i = queue.iterator();
- while(i.hasNext()) {
- QueueEntry entry = i.next();
- entry.shape.draw(g2, entry);
- }
- }
+ synchronized(queue) { queue.forEach(e -> e.shape.draw(g2, e)); }
}
/**
* 指定された長方形領域({@link Rectangle})の中央から図形の表示を開始します。
}
/**
* 指定された長方形領域({@link Rectangle})の中央から図形の表示を開始します。
@@
-253,7
+247,7
@@
public class AnoGakkiPane extends JComponent {
return;
}
point = SwingUtilities.convertPoint(source, point, this);
return;
}
point = SwingUtilities.convertPoint(source, point, this);
- synchronized
(queue) { queue.add(new QueueEntry(point)); }
+ synchronized(queue) { queue.add(new QueueEntry(point)); }
timer.start();
prevStartedAt = startedAt;
}
timer.start();
prevStartedAt = startedAt;
}