Class XBasicStyle

java.lang.Object
com.vividsolutions.jump.workbench.ui.renderer.style.BasicStyle
com.vividsolutions.jump.workbench.ui.renderer.style.XBasicStyle
All Implemented Interfaces:
AlphaSetting, Style, Cloneable, SLDImporter.FillStyle, SLDImporter.StrokeFillStyle, SLDImporter.StrokeStyle

public class XBasicStyle extends BasicStyle
Convenience class extending BasicStyle to include a VertexStyle and have both in one Style.
  • Constructor Details

    • XBasicStyle

      public XBasicStyle()
    • XBasicStyle

      public XBasicStyle(BasicStyle fromBasicStyle, VertexStyle fromVertexStyle)
  • Method Details

    • getFillColor

      public Color getFillColor()
      Overrides:
      getFillColor in class BasicStyle
    • getVertexStyle

      public VertexStyle getVertexStyle()
    • setVertexStyle

      public void setVertexStyle(VertexStyle vertexStyle)
    • 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
      Overrides:
      initialize in class BasicStyle
      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
      Overrides:
      paint in class BasicStyle
      Throws:
      Exception
    • clone

      public XBasicStyle clone()
      Description copied from class: BasicStyle
      Uses Object.clone() method which performs a shallow copy of this object, creating a new instance of the same class and copying attribute values of this object to the clone.
      Specified by:
      clone in interface Style
      Overrides:
      clone in class BasicStyle
      Returns:
      a clone of this BasicStyle
    • getFeatureColor

      public Color getFeatureColor(Feature feature)
      Description copied from class: BasicStyle
      - Giuseppe Aruta 11-June - 2012 - added code from SkyJUMP to enable color chooser plugIn - - Original comments from SkyJUMP developers - Looks for an Attribute field that contains the RGB color code and returns it or null if the RGB hex string is empty or ill-formed.
      Overrides:
      getFeatureColor in class BasicStyle
      Parameters:
      feature - the Feature containing the RGB Attribute to be parsed.
      Returns:
      the Color represented by the R_B_G hex value with the current Alpha value inserted. Warning: returns null in many "normal" cases.