Class AbstractStrokeOutlinePlotter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.object.objectannotations.outline.AbstractOutlinePlotter
-
- adams.gui.visualization.object.objectannotations.outline.AbstractStrokeOutlinePlotter
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,OutlinePlotter
,Serializable
- Direct Known Subclasses:
PolygonOutline
,PolygonVertices
,RectangleOutline
,RectangleVertices
public abstract class AbstractStrokeOutlinePlotter extends AbstractOutlinePlotter
Ancestor for plotters that define a stroke width.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected float
m_StrokeThickness
the thickness of the stroke.-
Fields inherited from class adams.gui.visualization.object.objectannotations.outline.AbstractOutlinePlotter
m_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 AbstractStrokeOutlinePlotter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
applyStroke(Graphics g, float stroke)
Applies the stroke thickness.void
defineOptions()
Adds options to the internal list of options.protected abstract void
doPlot(LocatedObject object, Color color, Graphics2D g)
Plots the outline.protected void
doPlotOutline(LocatedObject object, Color color, Graphics2D g)
Plots the outline.protected String
generateQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.float
getStrokeThickness()
Returns the current stroke thickness.protected float
getStrokeWidth(Graphics g, float defValue)
Returns the thickness of the stroke.void
setStrokeThickness(float value)
Sets the stroke thickness to use.String
strokeThicknessTipText()
Returns the tip text for this property.-
Methods inherited from class adams.gui.visualization.object.objectannotations.outline.AbstractOutlinePlotter
enabledTipText, getEnabled, getQuickInfo, plotOutline, setEnabled
-
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 classAbstractOutlinePlotter
-
getStrokeThickness
public float getStrokeThickness()
Returns the current stroke thickness.- Returns:
- the thickness
-
setStrokeThickness
public void setStrokeThickness(float value)
Sets the stroke thickness to use.- Parameters:
value
- 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.
-
generateQuickInfo
protected String generateQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Overrides:
generateQuickInfo
in classAbstractOutlinePlotter
- Returns:
- null if no info available, otherwise short string
-
getStrokeWidth
protected float getStrokeWidth(Graphics g, float defValue)
Returns the thickness of the stroke.- Parameters:
g
- graphics context to get the thickness fromdefValue
- the default value to return in case of failure- Returns:
- the stroke, default value if failed to extract
-
applyStroke
protected void applyStroke(Graphics g, float stroke)
Applies the stroke thickness.- Parameters:
stroke
- the thickness to apply
-
doPlot
protected abstract void doPlot(LocatedObject object, Color color, Graphics2D g)
Plots the outline.- Parameters:
object
- the object to plotcolor
- the color to useg
- the graphics context
-
doPlotOutline
protected void doPlotOutline(LocatedObject object, Color color, Graphics2D g)
Plots the outline.- Specified by:
doPlotOutline
in classAbstractOutlinePlotter
- Parameters:
object
- the object to plotcolor
- the color to useg
- the graphics context
-
-