Class BasicStyle
- java.lang.Object
-
- org.locationtech.jts.jump.workbench.ui.renderer.style.BasicStyle
-
-
Constructor Summary
Constructors Constructor Description BasicStyle()
BasicStyle(Color fillColor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
int
getAlpha()
Color
getFillColor()
Paint
getFillPattern()
Color
getLineColor()
String
getLinePattern()
BasicStroke
getLineStroke()
int
getLineWidth()
void
initialize(Layer layer)
Called before #paint is applied to each Feature.boolean
isEnabled()
boolean
isRenderingFill()
boolean
isRenderingFillPattern()
boolean
isRenderingLine()
boolean
isRenderingLinePattern()
void
paint(Feature f, Graphics2D g, Viewport viewport)
void
setAlpha(int alpha)
void
setEnabled(boolean enabled)
void
setFillColor(Color fillColor)
BasicStyle
setFillPattern(Paint fillPattern)
Remember to call #setRenderingFillPattern(true).void
setLineColor(Color lineColor)
BasicStyle
setLinePattern(String linePattern)
The actual dash pattern used internally will be the given dash pattern multiplied by the line length.void
setLineWidth(int lineWidth)
void
setRenderingFill(boolean renderingFill)
BasicStyle
setRenderingFillPattern(boolean renderingFillPattern)
void
setRenderingLine(boolean renderingLine)
BasicStyle
setRenderingLinePattern(boolean renderingLinePattern)
static float[]
toArray(String linePattern, float lineWidth)
-
-
-
Constructor Detail
-
BasicStyle
public BasicStyle(Color fillColor)
-
BasicStyle
public BasicStyle()
-
-
Method Detail
-
isRenderingFillPattern
public boolean isRenderingFillPattern()
-
setRenderingFillPattern
public BasicStyle setRenderingFillPattern(boolean renderingFillPattern)
-
getFillPattern
public Paint getFillPattern()
-
setFillPattern
public BasicStyle setFillPattern(Paint fillPattern)
Remember to call #setRenderingFillPattern(true).
-
getLinePattern
public String getLinePattern()
-
setLinePattern
public BasicStyle setLinePattern(String linePattern)
The actual dash pattern used internally will be the given dash pattern multiplied by the line length. Remember to call #setRenderingLinePattern(true).- Parameters:
linePattern
- e.g. "5,2,3,2"
-
initialize
public void initialize(Layer layer)
Description copied from interface:Style
Called before #paint is applied to each Feature.- Specified by:
initialize
in interfaceStyle
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabled
in interfaceStyle
-
paint
public void paint(Feature f, Graphics2D g, Viewport viewport) throws NoninvertibleTransformException
- Specified by:
paint
in interfaceStyle
- Throws:
NoninvertibleTransformException
-
isRenderingFill
public boolean isRenderingFill()
-
isRenderingLine
public boolean isRenderingLine()
-
isRenderingLinePattern
public boolean isRenderingLinePattern()
-
setRenderingFill
public void setRenderingFill(boolean renderingFill)
-
setRenderingLine
public void setRenderingLine(boolean renderingLine)
-
setRenderingLinePattern
public BasicStyle setRenderingLinePattern(boolean renderingLinePattern)
-
setFillColor
public void setFillColor(Color fillColor)
-
setLineColor
public void setLineColor(Color lineColor)
-
setLineWidth
public void setLineWidth(int lineWidth)
-
toArray
public static float[] toArray(String linePattern, float lineWidth)
-
getAlpha
public int getAlpha()
- Returns:
- 0-255 (255 is opaque)
-
getFillColor
public Color getFillColor()
-
getLineColor
public Color getLineColor()
-
getLineWidth
public int getLineWidth()
-
setAlpha
public void setAlpha(int alpha)
- Parameters:
alpha
- 0-255 (255 is opaque)
-
getLineStroke
public BasicStroke getLineStroke()
-
-