org.openjump.core.ui.plugin.tools
Class MeasurementStyle
java.lang.Object
org.openjump.core.ui.plugin.tools.MeasurementStyle
- All Implemented Interfaces:
- Style, java.lang.Cloneable
public class MeasurementStyle
- extends java.lang.Object
- implements Style
A special Style for usage in the AdvancedMeasureTool.
This Style paints the area and distance in the center of the Geometry's
Envelope. At every vertex the actual distance will be painted.
- Author:
- Matthias Scholz
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MeasurementStyle
public MeasurementStyle()
paint
public void paint(Feature f,
java.awt.Graphics2D g,
Viewport viewport)
throws java.lang.Exception
- Specified by:
paint in interface Style
- Throws:
java.lang.Exception
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
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.
clone
public java.lang.Object clone()
- Specified by:
clone in interface Style- Overrides:
clone in class java.lang.Object
getAreaAttribute
public java.lang.String getAreaAttribute()
- Returns:
- the areaAttribute
setAreaAttribute
public void setAreaAttribute(java.lang.String areaAttribute)
- Parameters:
areaAttribute - the areaAttribute to set
getLengthAttribute
public java.lang.String getLengthAttribute()
- Returns:
- the lengthAttribute
setLengthAttribute
public void setLengthAttribute(java.lang.String lengthAttribute)
- Parameters:
lengthAttribute - the lengthAttribute to set
getSummaryFont
public java.awt.Font getSummaryFont()
- Returns:
- the font
setSummaryFont
public void setSummaryFont(java.awt.Font font)
- Parameters:
font - the font to set
getSummaryColor
public java.awt.Color getSummaryColor()
- Returns:
- the summaryColor
setSummaryColor
public void setSummaryColor(java.awt.Color summaryColor)
- Parameters:
summaryColor - the summaryColor to set
isPaintSummaryLength
public boolean isPaintSummaryLength()
- Returns:
- the paintSummary
setPaintSummaryLength
public void setPaintSummaryLength(boolean paintSummary)
- Parameters:
paintSummary - the paintSummary to set
isPaintSummaryArea
public boolean isPaintSummaryArea()
- Returns:
- the paintSummaryArea
setPaintSummaryArea
public void setPaintSummaryArea(boolean paintSummaryArea)
- Parameters:
paintSummaryArea - the paintSummaryArea to set
getVertexFont
public java.awt.Font getVertexFont()
- Returns:
- the vertexFont
setVertexFont
public void setVertexFont(java.awt.Font vertexFont)
- Parameters:
vertexFont - the vertexFont to set
getVertexFontColor
public java.awt.Color getVertexFontColor()
- Returns:
- the vertexFontColor
setVertexFontColor
public void setVertexFontColor(java.awt.Color vertexFontColor)
- Parameters:
vertexFontColor - the vertexFontColor to set
isVertexPaintDistance
public boolean isVertexPaintDistance()
- Returns:
- the vertexPaintDistance
setVertexPaintDistance
public void setVertexPaintDistance(boolean vertexPaintDistance)
- Parameters:
vertexPaintDistance - the vertexPaintDistance to set
isVertexPaint
public boolean isVertexPaint()
- Returns:
- the vertexPaint
setVertexPaint
public void setVertexPaint(boolean vertexPaint)
- Parameters:
vertexPaint - the vertexPaint to set
getVertexFirstColor
public java.awt.Color getVertexFirstColor()
- Returns:
- the vertexFirstColor
setVertexFirstColor
public void setVertexFirstColor(java.awt.Color vertexFirstColor)
- Parameters:
vertexFirstColor - the vertexFirstColor to set
getVertexFirstForm
public java.lang.String getVertexFirstForm()
- Returns:
- the vertexFirstForm
setVertexFirstForm
public void setVertexFirstForm(java.lang.String vertexFirstForm)
- Parameters:
vertexFirstForm - the vertexFirstForm to set
getVertexFirstSize
public int getVertexFirstSize()
- Returns:
- the vertexFirstSize
setVertexFirstSize
public void setVertexFirstSize(int vertexFirstSize)
- Parameters:
vertexFirstSize - the vertexFirstSize to set
getVertexFollowingColor
public java.awt.Color getVertexFollowingColor()
- Returns:
- the vertexFollowingColor
setVertexFollowingColor
public void setVertexFollowingColor(java.awt.Color vertexFollowingColor)
- Parameters:
vertexFollowingColor - the vertexFollowingColor to set
getVertexFollowingForm
public java.lang.String getVertexFollowingForm()
- Returns:
- the vertexFollowingForm
setVertexFollowingForm
public void setVertexFollowingForm(java.lang.String vertexFollowingForm)
- Parameters:
vertexFollowingForm - the vertexFollowingForm to set
getVertexFollowingSize
public int getVertexFollowingSize()
- Returns:
- the vertexFollowingSize
setVertexFollowingSize
public void setVertexFollowingSize(int vertexFollowingSize)
- Parameters:
vertexFollowingSize - the vertexFollowingSize to set