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.
-
-
Field Summary
-
Fields inherited from class com.vividsolutions.jump.workbench.ui.renderer.style.BasicStyle
DEFAULT_FILL_COLOR, DEFAULT_FILL_STROKE, DEFAULT_LINE_COLOR, RGB_ATTRIBUTE_NAME
-
-
Constructor Summary
Constructors Constructor Description XBasicStyle()XBasicStyle(BasicStyle fromBasicStyle, VertexStyle fromVertexStyle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XBasicStyleclone()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.ColorgetFeatureColor(Feature feature)- 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.ColorgetFillColor()VertexStylegetVertexStyle()voidinitialize(Layer layer)Called before #paint is applied to each Feature.voidpaint(Feature f, Graphics2D g, Viewport viewport)voidsetVertexStyle(VertexStyle vertexStyle)-
Methods inherited from class com.vividsolutions.jump.workbench.ui.renderer.style.BasicStyle
getAlpha, getFillPattern, getLineColor, getLinePattern, getLineStroke, getLineWidth, getRenderingVertices, hasInteriorBorder, isEnabled, isRenderingFill, isRenderingFillPattern, isRenderingLine, isRenderingLinePattern, setAlpha, setEnabled, setFillColor, setFillPattern, setFractionalLineWidth, setInteriorBorder, setLineColor, setLinePattern, setLineWidth, setRenderingFill, setRenderingFillPattern, setRenderingLine, setRenderingLinePattern, setRenderingVertices, toArray
-
-
-
-
Constructor Detail
-
XBasicStyle
public XBasicStyle()
-
XBasicStyle
public XBasicStyle(BasicStyle fromBasicStyle, VertexStyle fromVertexStyle)
-
-
Method Detail
-
getFillColor
public Color getFillColor()
- Overrides:
getFillColorin classBasicStyle
-
getVertexStyle
public VertexStyle getVertexStyle()
-
setVertexStyle
public void setVertexStyle(VertexStyle vertexStyle)
-
initialize
public void initialize(Layer layer)
Description copied from interface:StyleCalled before #paint is applied to each Feature.- Specified by:
initializein interfaceStyle- Overrides:
initializein classBasicStyle- Parameters:
layer- the layer on which to apply this style
-
paint
public void paint(Feature f, Graphics2D g, Viewport viewport) throws Exception
- Specified by:
paintin interfaceStyle- Overrides:
paintin classBasicStyle- Throws:
Exception
-
clone
public XBasicStyle clone()
Description copied from class:BasicStyleUses 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:
clonein interfaceStyle- Overrides:
clonein classBasicStyle- 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:
getFeatureColorin classBasicStyle- Parameters:
feature- theFeaturecontaining the RGB Attribute to be parsed.- Returns:
- the
Colorrepresented by the R_B_G hex value with the current Alpha value inserted. Warning: returns null in many "normal" cases.
-
-