@@ -170,9 +170,9 @@ public PathNode(final SNTPoint point) {
170170 }
171171
172172 // Node color management
173- public Color getNodeColor () { return nodeColor ; }
174- public boolean hasNodeColor () { return nodeColor != null ; }
175- public void setNodeColor (final Color color ) { this .nodeColor = color ; }
173+ public Color getColor () { return nodeColor ; }
174+ public boolean hasColor () { return nodeColor != null ; }
175+ public void setColor (final Color color ) { this .nodeColor = color ; }
176176
177177 // Radius management
178178 public double getRadius () { return radius ; }
@@ -1976,12 +1976,12 @@ else if (getStartJoinsPoint() != null) {
19761976 */
19771977 public void setNodeColors (final Color [] colors ) {
19781978 if (colors == null ) {
1979- nodes .forEach (node -> node .setNodeColor (null ));
1979+ nodes .forEach (node -> node .setColor (null ));
19801980 } else if (colors .length != size ()) {
19811981 throw new IllegalArgumentException ("colors array must have as many elements as nodes" );
19821982 } else {
19831983 for (int i = 0 ; i < colors .length ; i ++)
1984- getNodeWithoutChecks (i ).setNodeColor (colors [i ]);
1984+ getNodeWithoutChecks (i ).setColor (colors [i ]);
19851985 }
19861986 }
19871987
@@ -1995,7 +1995,7 @@ public Color[] getNodeColors() {
19951995 // Direct array creation is faster than using streams!?
19961996 final Color [] colors = new Color [nodes .size ()];
19971997 for (int i = 0 ; i < nodes .size (); i ++)
1998- colors [i ] = nodes .get (i ).getNodeColor ();
1998+ colors [i ] = nodes .get (i ).getColor ();
19991999 return colors ;
20002000 }
20012001
@@ -2007,7 +2007,7 @@ public Color[] getNodeColors() {
20072007 * this path
20082008 */
20092009 public Color getNodeColor (final int pos ) {
2010- return getNodeWithChecks (pos ).getNodeColor ();
2010+ return getNodeWithChecks (pos ).getColor ();
20112011 }
20122012
20132013 /**
@@ -2017,7 +2017,7 @@ public Color getNodeColor(final int pos) {
20172017 * @param pos the node position
20182018 */
20192019 public void setNodeColor (final Color color , final int pos ) {
2020- getNodeWithChecks (pos ).setNodeColor (color );
2020+ getNodeWithChecks (pos ).setColor (color );
20212021 }
20222022
20232023 /**
@@ -2198,7 +2198,7 @@ public void setColor(final Color color) {
21982198 this .color = color ;
21992199 hasCustomColor = color != null ;
22002200 if (getFitted () != null ) getFitted ().setColor (color );
2201- if (hasNodeColors () && size () == 1 ) getNodeWithoutChecks (0 ).setNodeColor (color );
2201+ if (hasNodeColors () && size () == 1 ) getNodeWithoutChecks (0 ).setColor (color );
22022202 }
22032203
22042204 /**
@@ -2513,7 +2513,7 @@ public boolean hasRadii() {
25132513 public boolean hasNodeColors () {
25142514 // Direct iteration with early termination is faster than streams!?
25152515 for (final PathNode node : nodes ) {
2516- if (node .hasNodeColor ()) return true ;
2516+ if (node .hasColor ()) return true ;
25172517 }
25182518 return false ;
25192519 }
0 commit comments