Class TextBasedVertexStyle
- java.lang.Object
-
- org.openjump.core.ui.style.decoration.TextBasedVertexStyle
-
- All Implemented Interfaces:
ChoosableStyle,Style,Cloneable
- Direct Known Subclasses:
VertexZValueStyle
public abstract class TextBasedVertexStyle extends Object implements ChoosableStyle
-
-
Constructor Summary
Constructors Constructor Description TextBasedVertexStyle()TextBasedVertexStyle(String name, Icon icon)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Objectclone()IcongetIcon()For display.StringgetName()For display.voidinitialize(Layer layer)Called before #paint is applied to each Feature.booleanisEnabled()voidpaint(Feature f, Graphics2D g, Viewport viewport)protected abstract voidpaint(Point2D p0, org.locationtech.jts.geom.LineString line, int index, Viewport viewport, Graphics2D graphics)protected voidpaintGeometry(org.locationtech.jts.geom.Geometry geometry, Graphics2D graphics, Viewport viewport)protected voidpaintLineString(org.locationtech.jts.geom.LineString lineString, Viewport viewport, Graphics2D graphics)protected abstract voidpaintPoint(org.locationtech.jts.geom.Point point, Viewport viewport, Graphics2D graphics)voidsetEnabled(boolean enabled)
-
-
-
Method Detail
-
paintGeometry
protected void paintGeometry(org.locationtech.jts.geom.Geometry geometry, Graphics2D graphics, Viewport viewport) throws Exception- Throws:
Exception
-
paintLineString
protected void paintLineString(org.locationtech.jts.geom.LineString lineString, Viewport viewport, Graphics2D graphics) throws Exception- Parameters:
lineString- has 2 or more pointsviewport- the viewport to paint the lineString tographics- the graphic context- Throws:
Exception- if an Exception occurs during painting
-
paint
protected abstract void paint(Point2D p0, org.locationtech.jts.geom.LineString line, int index, Viewport viewport, Graphics2D graphics) throws Exception
- Throws:
Exception
-
paintPoint
protected abstract void paintPoint(org.locationtech.jts.geom.Point point, Viewport viewport, Graphics2D graphics) throws Exception- Throws:
Exception
-
initialize
public void initialize(Layer layer)
Description copied from interface:StyleCalled before #paint is applied to each Feature.- Specified by:
initializein interfaceStyle- Parameters:
layer- the layer on which to apply this style
-
paint
public void paint(Feature f, Graphics2D g, Viewport viewport) throws Exception
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabledin interfaceStyle
-
isEnabled
public boolean isEnabled()
-
getName
public String getName()
Description copied from interface:ChoosableStyleFor display.- Specified by:
getNamein interfaceChoosableStyle- Returns:
- the name of this Style
-
getIcon
public Icon getIcon()
Description copied from interface:ChoosableStyleFor display. 20 x 20 pixels.- Specified by:
getIconin interfaceChoosableStyle- Returns:
- an Icon representing this Style
-
-