@@ -625,10 +625,10 @@ private void initNodes() {
625625
626626 private SmartGraphVertexNode <V > createVertex (Vertex <V > v , double x , double y ) {
627627 // Read shape type from annotation or use default (circle)
628- String shapeType = inferVertexShapeType (v .element ());
628+ String shapeType = getVertexShapeTypeFor (v .element ());
629629
630630 // Read shape radius from annotation or use default
631- double shapeRadius = inferVertexShapeRadius (v .element ());
631+ double shapeRadius = getVertexShapeRadiusFor (v .element ());
632632
633633 return new SmartGraphVertexNode <>(v , x , y , shapeRadius , shapeType , graphProperties .getVertexAllowUserMove ());
634634 }
@@ -867,14 +867,13 @@ private void updateNodes() {
867867 String text = getVertexLabelFor (v .element ());
868868 label .setText_ ( text );
869869 }
870-
871- }
872870
873- double radius = inferVertexShapeRadius (v .element ());
874- vertexNode .setRadius (radius );
871+ double radius = getVertexShapeRadiusFor (v .element ());
872+ vertexNode .setRadius (radius );
875873
876- String shapeType = inferVertexShapeType (v .element ());
877- vertexNode .setShapeType (shapeType );
874+ String shapeType = getVertexShapeTypeFor (v .element ());
875+ vertexNode .setShapeType (shapeType );
876+ }
878877
879878 });
880879
@@ -938,7 +937,7 @@ protected final String getEdgeLabelFor(E edgeElement) {
938937 return edgeElement .toString ();
939938 }
940939
941- private String inferVertexShapeType (V vertexElement ) {
940+ protected final String getVertexShapeTypeFor (V vertexElement ) {
942941
943942 if (vertexElement == null ) return graphProperties .getVertexShape ();
944943
@@ -962,7 +961,7 @@ private String inferVertexShapeType(V vertexElement) {
962961 return graphProperties .getVertexShape ();
963962 }
964963
965- private double inferVertexShapeRadius (V vertexElement ) {
964+ protected final double getVertexShapeRadiusFor (V vertexElement ) {
966965
967966 if (vertexElement == null ) return graphProperties .getVertexRadius ();
968967
@@ -976,7 +975,7 @@ private double inferVertexShapeRadius(V vertexElement) {
976975 if (method .isAnnotationPresent (SmartRadiusSource .class )) {
977976 method .setAccessible (true );
978977 Object value = method .invoke (vertexElement );
979- return Double .valueOf (value .toString ());
978+ return Double .parseDouble (value .toString ());
980979 }
981980 }
982981 } catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex ) {
0 commit comments