Class StrokeFactory
java.lang.Object
org.graphstream.ui.swing_viewer.util.StrokeFactory
Generator for strokes based on the given style.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static StrokegenerateDashesStroke(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.util.GraphMetrics metrics) protected static StrokegenerateDotsStroke(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.util.GraphMetrics metrics) protected static StrokegeneratePlainStroke(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.util.GraphMetrics metrics) static StrokegenerateStroke(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.util.GraphMetrics metrics) Generate a stroke of the appropriate width and style according to the given style and metrics.
-
Field Details
-
dots
protected static float[] dots -
dashes
protected static float[] dashes
-
-
Constructor Details
-
StrokeFactory
public StrokeFactory()
-
-
Method Details
-
generateStroke
public static Stroke generateStroke(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.util.GraphMetrics metrics) Generate a stroke of the appropriate width and style according to the given style and metrics.- Parameters:
style- The style to use.metrics- The metrics to use.- Returns:
- The stroke or null if the style specifies a "none" stroke mode.
-
generatePlainStroke
protected static Stroke generatePlainStroke(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.util.GraphMetrics metrics) -
generateDotsStroke
protected static Stroke generateDotsStroke(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.util.GraphMetrics metrics) -
generateDashesStroke
protected static Stroke generateDashesStroke(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.util.GraphMetrics metrics)
-