Class LineStringStyle

java.lang.Object
com.vividsolutions.jump.workbench.ui.renderer.style.LineStringStyle
All Implemented Interfaces:
Style, Cloneable
Direct Known Subclasses:
LineStringEndpointStyle, LineStringSegmentStyle, LineStringVertexStyle

public abstract class LineStringStyle extends Object implements Style
  • Field Details

    • enabled

      protected boolean enabled
    • stroke

      protected Stroke stroke
    • lineColorWithAlpha

      protected Color lineColorWithAlpha
    • fillColorWithAlpha

      protected Color fillColorWithAlpha
  • Constructor Details

    • LineStringStyle

      public LineStringStyle(String name, Icon icon)
  • Method Details

    • clone

      public Object clone()
      Specified by:
      clone in interface Style
      Overrides:
      clone in class Object
    • paintGeometry

      protected void paintGeometry(org.locationtech.jts.geom.Geometry geometry, Graphics2D graphics, Viewport viewport) throws Exception
      Throws:
      Exception
    • paintLineString

      protected abstract void paintLineString(org.locationtech.jts.geom.LineString lineString, Viewport viewport, Graphics2D graphics) throws Exception
      Parameters:
      lineString - has 2 or more points
      viewport - the viewport to paint the lineString to
      graphics - the graphic context
      Throws:
      Exception - if an Exception occurs during painting
    • setEnabled

      public void setEnabled(boolean enabled)
      Specified by:
      setEnabled in interface Style
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface Style
      Returns:
      false if #paint should not be called e.g. because vertices are not shown. Don't need to check whether the layer is visible.
    • initialize

      public void initialize(Layer layer)
      Description copied from interface: Style
      Called before #paint is applied to each Feature.
      Specified by:
      initialize in interface Style
      Parameters:
      layer - the layer on which to apply this style
    • paint

      public void paint(Feature f, Graphics2D g, Viewport viewport) throws Exception
      Specified by:
      paint in interface Style
      Throws:
      Exception