Class StrokeFactory

java.lang.Object
org.graphstream.ui.swing_viewer.util.StrokeFactory

public class StrokeFactory extends Object
Generator for strokes based on the given style.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static float[]
     
    protected static float[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static Stroke
    generateDashesStroke(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.util.GraphMetrics metrics)
     
    protected static Stroke
    generateDotsStroke(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.util.GraphMetrics metrics)
     
    protected static Stroke
    generatePlainStroke(org.graphstream.ui.graphicGraph.stylesheet.Style style, org.graphstream.ui.view.util.GraphMetrics metrics)
     
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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)