Class ObjectLocationsOverlayFromReport
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.object.overlay.AbstractOverlay
-
- adams.gui.visualization.object.overlay.AbstractObjectOverlayFromReport
-
- adams.gui.visualization.object.overlay.ObjectLocationsOverlayFromReport
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Overlay
,OverlayWithCustomAlphaSupport
,Serializable
public class ObjectLocationsOverlayFromReport extends AbstractObjectOverlayFromReport implements OverlayWithCustomAlphaSupport
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_Filled
whether to draw the shape filled.protected boolean
m_PolygonBounds
whether to draw the bounds of the polygon as well.protected float
m_StrokeThickness
the thickness of the stroke.-
Fields inherited from class adams.gui.visualization.object.overlay.AbstractObjectOverlayFromReport
m_CustomAlpha, m_CustomAlphaColorCache, m_CustomAlphaEnabled, m_LocationsUpdatedListeners, m_Overlays, PREFIX_DEFAULT
-
Fields inherited from class adams.gui.visualization.object.overlay.AbstractOverlay
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 ObjectLocationsOverlayFromReport()
-
Method Summary
All Methods Instance 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 void
doPaintObjects(ObjectAnnotationPanel panel, Graphics g, List<Polygon> locations)
Performs the actual painting of the objects.String
filledTipText()
Returns the tip text for this property.boolean
getFilled()
Returns whether to draw the shape filled.boolean
getPolygonBounds()
Returns whether to draw the polygon bounds.float
getStrokeThickness()
Returns the current stroke thickness.protected float
getStrokeWidth(Graphics g, float defValue)
Returns the thickness of the stroke.String
globalInfo()
Returns a string describing the object.String
polygonBoundsTipText()
Returns the tip text for this property.void
setFilled(boolean value)
Sets whether to draw the shape filled.void
setPolygonBounds(boolean value)
Sets whether to draw the polygon bounds.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.overlay.AbstractObjectOverlayFromReport
addLocationsUpdatedListeners, annotationsChanged, applyAlpha, cleanUp, colorTipText, doPaint, getColor, getCustomAlpha, getLabelAnchor, getLabelFont, getLabelFormat, getLabelOffsetX, getLabelOffsetY, getPredefinedLabels, getPrefix, getTypeColor, getTypeColorProvider, getTypeRegExp, getTypeSuffix, getUseColorsPerType, hasTypeColor, initialize, isCustomAlphaEnabled, labelAnchorTipText, labelFontTipText, labelFormatTipText, labelOffsetXTipText, labelOffsetYTipText, notifyLocationsUpdatedListeners, predefinedLabelsTipText, prefixTipText, removeLocationsUpdatedListeners, setColor, setCustomAlpha, setCustomAlphaEnabled, setLabelAnchor, setLabelFont, setLabelFormat, setLabelOffsetX, setLabelOffsetY, setPredefinedLabels, setPrefix, setTypeColorProvider, setTypeRegExp, setTypeSuffix, setUseColorsPerType, typeColorProviderTipText, typeRegExpTipText, typeSuffixTipText, useColorsPerTypeTipText
-
Methods inherited from class adams.gui.visualization.object.overlay.AbstractOverlay
enabledTipText, getEnabled, paint, setEnabled
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, 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
-
Methods inherited from interface adams.gui.visualization.object.overlay.Overlay
annotationsChanged, cleanUp, enabledTipText, getEnabled, paint, setEnabled
-
Methods inherited from interface adams.gui.visualization.object.overlay.OverlayWithCustomAlphaSupport
getCustomAlpha, isCustomAlphaEnabled, setCustomAlpha, setCustomAlphaEnabled
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractObjectOverlayFromReport
-
setFilled
public void setFilled(boolean value)
Sets whether to draw the shape filled.- Parameters:
value
- true if to fill
-
getFilled
public boolean getFilled()
Returns whether to draw the shape filled.- Returns:
- true if to fill
-
filledTipText
public String filledTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPolygonBounds
public void setPolygonBounds(boolean value)
Sets whether to draw the polygon bounds.- Parameters:
value
- true if to draw bounds
-
getPolygonBounds
public boolean getPolygonBounds()
Returns whether to draw the polygon bounds.- Returns:
- true if to draw bounds
-
polygonBoundsTipText
public String polygonBoundsTipText()
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.
-
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
-
doPaintObjects
protected void doPaintObjects(ObjectAnnotationPanel panel, Graphics g, List<Polygon> locations)
Performs the actual painting of the objects.- Specified by:
doPaintObjects
in classAbstractObjectOverlayFromReport
- Parameters:
panel
- the panel this overlay is forg
- the graphics contextlocations
- the locations to paint
-
-