Class PolygonPointAnnotator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.object.annotator.AbstractAnnotator
-
- adams.gui.visualization.object.annotator.AbstractReportBasedAnnotator
-
- adams.gui.visualization.object.annotator.AbstractRectangleBasedAnnotator
-
- adams.gui.visualization.object.annotator.PolygonPointAnnotator
-
- All Implemented Interfaces:
CleanUpHandler,Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,ObjectPrefixHandler,LabelSuffixHandler,Serializable
public class PolygonPointAnnotator extends AbstractRectangleBasedAnnotator implements LabelSuffixHandler
For annotating polygons by left-clicking on each vertex.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Colorm_Colorthe color to use.protected KeyListenerm_KeyListenerthe key listener to install.protected Stringm_LabelSuffixthe label suffix to use.protected intm_MarkerSizethe marker size.protected MouseListenerm_MouseListenerthe mouse listener to install.protected List<Point>m_Pointsthe points of the polygon.protected floatm_StrokeThicknessthe thickness of the stroke.-
Fields inherited from class adams.gui.visualization.object.annotator.AbstractRectangleBasedAnnotator
m_Locations, m_NumDigits
-
Fields inherited from class adams.gui.visualization.object.annotator.AbstractReportBasedAnnotator
m_Prefix
-
Fields inherited from class adams.gui.visualization.object.annotator.AbstractAnnotator
m_Owner, m_Selecting
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description PolygonPointAnnotator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcolorTipText()Returns the tip text for this property.protected KeyListenercreateKeyListener()Constructs the key listener to use.protected MouseListenercreateMouseListener()Creates the listener for mouse events.voiddefineOptions()Adds options to the internal list of options.protected voiddoInstall()Installs the annotator with the owner.protected voiddoPaintSelection(Graphics g)Paints the selection.protected voiddoUninstall()Uninstalls the annotator with the owner.ColorgetColor()Returns the color to use.protected StringgetDefaultLabel()Returns the default label to use for the objects.protected StringgetDefaultLabelSuffix()Returns the default suffix to use for the label.StringgetLabelSuffix()Returns the suffix to use for the label.intgetMarkerSize()Returns the size of the vertex markers.floatgetStrokeThickness()Returns the current stroke thickness.StringglobalInfo()Returns a string describing the object.protected voidinitialize()Initializes the members.StringlabelSuffixTipText()Returns the tip text for this property.StringmarkerSizeTipText()Returns the tip text for this property.protected voidprocessSelection()Processes the selection.voidsetColor(Color value)Sets the color to use.voidsetLabelSuffix(String value)Sets the suffix to use for the label.voidsetMarkerSize(int value)Sets the size of the vertex markers.voidsetStrokeThickness(float value)Sets the stroke thickness to use.StringstrokeThicknessTipText()Returns the tip text for this property.-
Methods inherited from class adams.gui.visualization.object.annotator.AbstractRectangleBasedAnnotator
annotationsChanged, getDefaultNumDigits, getDefaultPrefix, getLocations, getNumDigits, numDigitsTipText, reset, setNumDigits
-
Methods inherited from class adams.gui.visualization.object.annotator.AbstractReportBasedAnnotator
findLastIndex, getPrefix, prefixTipText, removeIndex, setPrefix, valuesForIndex
-
Methods inherited from class adams.gui.visualization.object.annotator.AbstractAnnotator
applyStroke, cleanUp, getCurrentLabel, getOwner, getStrokeWidth, hasCurrentLabel, install, labelChanged, paintSelection, setOwner, uninstall
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Color
protected Color m_Color
the color to use.
-
m_StrokeThickness
protected float m_StrokeThickness
the thickness of the stroke.
-
m_MarkerSize
protected int m_MarkerSize
the marker size.
-
m_LabelSuffix
protected String m_LabelSuffix
the label suffix to use.
-
m_MouseListener
protected MouseListener m_MouseListener
the mouse listener to install.
-
m_KeyListener
protected KeyListener m_KeyListener
the key listener to install.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractRectangleBasedAnnotator
-
setColor
public void setColor(Color value)
Sets the color to use.- Parameters:
value- the color
-
getColor
public Color getColor()
Returns the color to use.- Returns:
- the color
-
colorTipText
public String colorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setStrokeThickness
public void setStrokeThickness(float value)
Sets the stroke thickness to use.- Parameters:
value- the thickness
-
getStrokeThickness
public float getStrokeThickness()
Returns the current stroke thickness.- Returns:
- the thickness
-
strokeThicknessTipText
public String strokeThicknessTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMarkerSize
public void setMarkerSize(int value)
Sets the size of the vertex markers.- Parameters:
value- the size
-
getMarkerSize
public int getMarkerSize()
Returns the size of the vertex markers.- Returns:
- the size
-
markerSizeTipText
public String markerSizeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultLabel
protected String getDefaultLabel()
Returns the default label to use for the objects.- Returns:
- the default
-
getDefaultLabelSuffix
protected String getDefaultLabelSuffix()
Returns the default suffix to use for the label.- Returns:
- the default
-
setLabelSuffix
public void setLabelSuffix(String value)
Sets the suffix to use for the label.- Specified by:
setLabelSuffixin interfaceLabelSuffixHandler- Parameters:
value- the suffix
-
getLabelSuffix
public String getLabelSuffix()
Returns the suffix to use for the label.- Specified by:
getLabelSuffixin interfaceLabelSuffixHandler- Returns:
- the suffix
-
labelSuffixTipText
public String labelSuffixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classAbstractAnnotator
-
createMouseListener
protected MouseListener createMouseListener()
Creates the listener for mouse events.- Returns:
- the instance
-
createKeyListener
protected KeyListener createKeyListener()
Constructs the key listener to use.- Returns:
- the listener
-
processSelection
protected void processSelection()
Processes the selection.
-
doInstall
protected void doInstall()
Installs the annotator with the owner.- Specified by:
doInstallin classAbstractAnnotator
-
doUninstall
protected void doUninstall()
Uninstalls the annotator with the owner.- Specified by:
doUninstallin classAbstractAnnotator
-
doPaintSelection
protected void doPaintSelection(Graphics g)
Paints the selection.- Specified by:
doPaintSelectionin classAbstractAnnotator- Parameters:
g- the graphics context
-
-