\r
private static final long serialVersionUID = 1294351381209071074L;\r
\r
+ private static final BasicStroke STROKE = new BasicStroke(1.0f);\r
+\r
private Color color;\r
private Stroke stroke;\r
private Rectangle2D beginBounds;\r
transient public boolean hover = false;\r
\r
private transient PropertyChangeListener fieldListener = null;\r
- \r
+\r
public void setFieldListener(PropertyChangeListener listener) {\r
this.fieldListener = listener;\r
}\r
// NICENESS\r
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r
\r
+ // FIXME: optimize memory allocations\r
Pair<Shape, Shape> shapes = Dependencies.createArrowShape(beginBounds, endBounds, angle);\r
\r
boolean selected = NodeUtil.isSelected(this, 2);\r
if(selected) {\r
g.setColor(Color.PINK);\r
- g.setStroke(new BasicStroke(1.0f));\r
+ g.setStroke(STROKE);\r
g.draw(shapes.first);\r
g.fill(shapes.second);\r
if(color != null) g.setColor(color);\r
g.fill(shapes.second);\r
} else if (hover){\r
g.setColor(Color.LIGHT_GRAY);\r
- g.setStroke(new BasicStroke(1.0f));\r
+ g.setStroke(STROKE);\r
g.draw(shapes.first);\r
g.fill(shapes.second);\r
if(color != null) g.setColor(color);\r
public class FlowNode extends G2DNode implements ISelectionPainterNode {\r
\r
private static final long serialVersionUID = 328942356917631237L;\r
- \r
+\r
+ private static final BasicStroke STROKE = new BasicStroke(1.0f);\r
+\r
private Color color;\r
private Stroke stroke;\r
private Rectangle2D beginBounds;\r
\r
if(toValve) {\r
\r
+ // FIXME: optimize memory allocations\r
lines = Flows.createLines(false, endBounds, beginBounds);\r
\r
} else {\r
\r
+ // FIXME: optimize memory allocations\r
lines = Flows.createLines(true, beginBounds, endBounds);\r
arrow = Flows.createArrow(beginBounds, endBounds);\r
\r
boolean selected = NodeUtil.isSelected(this, 2);\r
if(selected) {\r
g.setColor(Color.PINK);\r
- g.setStroke(new BasicStroke(1.0f));\r
+ g.setStroke(STROKE);\r
g.draw(lines.first);\r
g.draw(lines.second);\r
if(color != null) g.setColor(color);\r