Class AbstractShapePlotter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.object.objectannotations.shape.AbstractShapePlotter
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,ShapePlotter
,Serializable
- Direct Known Subclasses:
Center
,FilledPolygon
,FilledRectangle
,MultiShapePlotter
,NoShape
public abstract class AbstractShapePlotter extends AbstractOptionHandler implements ShapePlotter
Ancestor for outline plotters.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_Enabled
whether the plotter is enabled.-
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 AbstractShapePlotter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected abstract void
doPlotShape(LocatedObject object, Color color, Graphics2D g)
Plots the outline.String
enabledTipText()
Returns the tip text for this property.protected String
generateQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.boolean
getEnabled()
Returns whether the plotter is enabled.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.void
plotShape(LocatedObject object, Color color, Graphics2D g)
Plots the outline.void
setEnabled(boolean value)
Sets whether the plotter is enabled.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, 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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setEnabled
public void setEnabled(boolean value)
Sets whether the plotter is enabled.- Parameters:
value
- true if enabled
-
getEnabled
public boolean getEnabled()
Returns whether the plotter is enabled.- Returns:
- true if enabled
-
enabledTipText
public String enabledTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
generateQuickInfo
protected String generateQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.
Default implementation returns null.- Returns:
- null if no info available, otherwise short string
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Returns:
- null if no info available, otherwise short string
-
doPlotShape
protected abstract void doPlotShape(LocatedObject object, Color color, Graphics2D g)
Plots the outline.- Parameters:
object
- the object to plotcolor
- the color to useg
- the graphics context
-
plotShape
public void plotShape(LocatedObject object, Color color, Graphics2D g)
Plots the outline.- Specified by:
plotShape
in interfaceShapePlotter
- Parameters:
object
- the object to plotcolor
- the color to useg
- the graphics context
-
-