Package adams.gui.visualization.image
Class ObjectAnnotations
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.image.AbstractImageOverlay
-
- adams.gui.visualization.image.ObjectAnnotations
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractImageOverlay>
,SizeOfHandler
,ObjectPrefixHandler
,ImageOverlay
,Serializable
public class ObjectAnnotations extends AbstractImageOverlay implements ObjectPrefixHandler
Overlays object annotations from the report.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ObjectAnnotations.LocatedObjectsPanel
The panel for displaying the located objects.
-
Field Summary
Fields Modifier and Type Field Description protected LocatedObjects
m_Annotations
the annotations.protected AnnotationCleaner[]
m_Cleaners
the cleaners to use.protected AnnotationColors[]
m_LabelColors
the colorizers for the labels.protected LabelPlotter[]
m_LabelPlotters
the label plotters.protected AnnotationColors[]
m_OutlineColors
the colorizers for the outline.protected OutlinePlotter[]
m_OutlinePlotters
the outline plotters.protected ImagePanel.PaintPanel
m_Owner
the owning panel.protected ObjectAnnotations.LocatedObjectsPanel
m_PanelObjects
the panel with the located objects.protected String
m_Prefix
the prefix to use.protected AnnotationColors[]
m_ShapeColors
the colorizers for the shape.protected ShapePlotter[]
m_ShapePlotters
the shape plotters.protected boolean
m_ShowObjectPanel
whether to show the located object panel.-
Fields inherited from class adams.gui.visualization.image.AbstractImageOverlay
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 ObjectAnnotations()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
cleanersTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected void
doImageChanged(ImagePanel.PaintPanel panel)
Notifies the overlay that the image has changed.protected void
doPaintObjects(ImagePanel.PaintPanel panel, Graphics g, LocatedObjects annotations)
Performs the actual painting of the objects.protected void
doPaintOverlay(ImagePanel.PaintPanel panel, Graphics g)
Performs the actual painting of the overlay.AnnotationCleaner[]
getCleaners()
Returns the cleaners for the annotations.AnnotationColors[]
getLabelColors()
Returns the colorizers for the label plotters.LabelPlotter[]
getLabelPlotters()
Returns the plotters for the labels.protected ObjectAnnotations.LocatedObjectsPanel
getLocatedObjectsPanel()
Returns the objects panel, instantiates it if necessary.AnnotationColors[]
getOutlineColors()
Returns the colorizers for the outline plotters.OutlinePlotter[]
getOutlinePlotters()
Returns the plotters for the outlines.ImagePanel.PaintPanel
getOwner()
Returns the owning panel.String
getPrefix()
Returns the field prefix used in the report.AnnotationColors[]
getShapeColors()
Returns the colorizers for the shape plotters.ShapePlotter[]
getShapePlotters()
Returns the plotters for the shapes.boolean
getShowObjectPanel()
Returns whether to show the panel with the located objects.String
globalInfo()
Returns a string describing the object.protected void
initAnnotations(ImagePanel.PaintPanel panel)
Initializes the annotations.String
labelColorsTipText()
Returns the tip text for this property.String
labelPlottersTipText()
Returns the tip text for this property.String
outlineColorsTipText()
Returns the tip text for this property.String
outlinePlottersTipText()
Returns the tip text for this property.void
overlayAdded(ImagePanel.PaintPanel panel)
Gets called when the image overlay got added to a paintable panel.void
overlayRemoved(ImagePanel.PaintPanel panel)
Gets called when the image overlay got removed from a paintable panel.String
prefixTipText()
Returns the tip text for this property.protected void
reset()
Resets the scheme.void
setCleaners(AnnotationCleaner[] value)
Sets the cleaners for the annotations.void
setLabelColors(AnnotationColors[] value)
Sets the colorizers for the label plotters.void
setLabelPlotters(LabelPlotter[] value)
Sets the plotters for the labels.void
setOutlineColors(AnnotationColors[] value)
Sets the colorizers for the outline plotters.void
setOutlinePlotters(OutlinePlotter[] value)
Sets the plotters for the outlines.void
setPrefix(String value)
Sets the field prefix used in the report.void
setShapeColors(AnnotationColors[] value)
Sets the colorizers for the shape plotters.void
setShapePlotters(ShapePlotter[] value)
Sets the plotters for the shapes.void
setShowObjectPanel(boolean value)
Sets whether to show the panel with the located panels.String
shapeColorsTipText()
Returns the tip text for this property.String
shapePlottersTipText()
Returns the tip text for this property.String
showObjectPanelTipText()
Returns the tip text for this property.-
Methods inherited from class adams.gui.visualization.image.AbstractImageOverlay
cleanUp, enabledTipText, imageChanged, isEnabled, paintOverlay, setEnabled, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, 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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Prefix
protected String m_Prefix
the prefix to use.
-
m_Cleaners
protected AnnotationCleaner[] m_Cleaners
the cleaners to use.
-
m_ShapePlotters
protected ShapePlotter[] m_ShapePlotters
the shape plotters.
-
m_ShapeColors
protected AnnotationColors[] m_ShapeColors
the colorizers for the shape.
-
m_OutlinePlotters
protected OutlinePlotter[] m_OutlinePlotters
the outline plotters.
-
m_OutlineColors
protected AnnotationColors[] m_OutlineColors
the colorizers for the outline.
-
m_LabelPlotters
protected LabelPlotter[] m_LabelPlotters
the label plotters.
-
m_LabelColors
protected AnnotationColors[] m_LabelColors
the colorizers for the labels.
-
m_Annotations
protected transient LocatedObjects m_Annotations
the annotations.
-
m_ShowObjectPanel
protected boolean m_ShowObjectPanel
whether to show the located object panel.
-
m_PanelObjects
protected ObjectAnnotations.LocatedObjectsPanel m_PanelObjects
the panel with the located objects.
-
m_Owner
protected transient ImagePanel.PaintPanel m_Owner
the owning panel.
-
-
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 classAbstractImageOverlay
-
reset
protected void reset()
Resets the scheme.- Overrides:
reset
in classAbstractOptionHandler
-
setPrefix
public void setPrefix(String value)
Sets the field prefix used in the report.- Specified by:
setPrefix
in interfaceObjectPrefixHandler
- Parameters:
value
- the field prefix
-
getPrefix
public String getPrefix()
Returns the field prefix used in the report.- Specified by:
getPrefix
in interfaceObjectPrefixHandler
- Returns:
- the field prefix
-
prefixTipText
public String prefixTipText()
Returns the tip text for this property.- Specified by:
prefixTipText
in interfaceObjectPrefixHandler
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setCleaners
public void setCleaners(AnnotationCleaner[] value)
Sets the cleaners for the annotations.- Parameters:
value
- the cleaners
-
getCleaners
public AnnotationCleaner[] getCleaners()
Returns the cleaners for the annotations.- Returns:
- the cleaners
-
cleanersTipText
public String cleanersTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setShapeColors
public void setShapeColors(AnnotationColors[] value)
Sets the colorizers for the shape plotters.- Parameters:
value
- the colorizers
-
getShapeColors
public AnnotationColors[] getShapeColors()
Returns the colorizers for the shape plotters.- Returns:
- the colorizers
-
shapeColorsTipText
public String shapeColorsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setShapePlotters
public void setShapePlotters(ShapePlotter[] value)
Sets the plotters for the shapes.- Parameters:
value
- the plotters
-
getShapePlotters
public ShapePlotter[] getShapePlotters()
Returns the plotters for the shapes.- Returns:
- the plotters
-
shapePlottersTipText
public String shapePlottersTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOutlineColors
public void setOutlineColors(AnnotationColors[] value)
Sets the colorizers for the outline plotters.- Parameters:
value
- the colorizers
-
getOutlineColors
public AnnotationColors[] getOutlineColors()
Returns the colorizers for the outline plotters.- Returns:
- the colorizers
-
outlineColorsTipText
public String outlineColorsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOutlinePlotters
public void setOutlinePlotters(OutlinePlotter[] value)
Sets the plotters for the outlines.- Parameters:
value
- the plotters
-
getOutlinePlotters
public OutlinePlotter[] getOutlinePlotters()
Returns the plotters for the outlines.- Returns:
- the plotters
-
outlinePlottersTipText
public String outlinePlottersTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setLabelColors
public void setLabelColors(AnnotationColors[] value)
Sets the colorizers for the label plotters.- Parameters:
value
- the colorizers
-
getLabelColors
public AnnotationColors[] getLabelColors()
Returns the colorizers for the label plotters.- Returns:
- the colorizers
-
labelColorsTipText
public String labelColorsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setLabelPlotters
public void setLabelPlotters(LabelPlotter[] value)
Sets the plotters for the labels.- Parameters:
value
- the plotters
-
getLabelPlotters
public LabelPlotter[] getLabelPlotters()
Returns the plotters for the labels.- Returns:
- the plotters
-
labelPlottersTipText
public String labelPlottersTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setShowObjectPanel
public void setShowObjectPanel(boolean value)
Sets whether to show the panel with the located panels.- Parameters:
value
- true if to show
-
getShowObjectPanel
public boolean getShowObjectPanel()
Returns whether to show the panel with the located objects.- Returns:
- true if to show
-
showObjectPanelTipText
public String showObjectPanelTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getOwner
public ImagePanel.PaintPanel getOwner()
Returns the owning panel.- Returns:
- the owner, null if none set
-
getLocatedObjectsPanel
protected ObjectAnnotations.LocatedObjectsPanel getLocatedObjectsPanel()
Returns the objects panel, instantiates it if necessary.- Returns:
- the panel
-
overlayAdded
public void overlayAdded(ImagePanel.PaintPanel panel)
Gets called when the image overlay got added to a paintable panel.- Specified by:
overlayAdded
in interfaceImageOverlay
- Overrides:
overlayAdded
in classAbstractImageOverlay
- Parameters:
panel
- the panel it got added to
-
overlayRemoved
public void overlayRemoved(ImagePanel.PaintPanel panel)
Gets called when the image overlay got removed from a paintable panel.- Specified by:
overlayRemoved
in interfaceImageOverlay
- Overrides:
overlayRemoved
in classAbstractImageOverlay
- Parameters:
panel
- the panel it got removed from
-
doImageChanged
protected void doImageChanged(ImagePanel.PaintPanel panel)
Notifies the overlay that the image has changed.- Specified by:
doImageChanged
in classAbstractImageOverlay
- Parameters:
panel
- the panel this overlay belongs to
-
initAnnotations
protected void initAnnotations(ImagePanel.PaintPanel panel)
Initializes the annotations.- Parameters:
panel
- the context
-
doPaintObjects
protected void doPaintObjects(ImagePanel.PaintPanel panel, Graphics g, LocatedObjects annotations)
Performs the actual painting of the objects.- Parameters:
panel
- the panel this overlay is forg
- the graphics contextannotations
- the annotations to paint
-
doPaintOverlay
protected void doPaintOverlay(ImagePanel.PaintPanel panel, Graphics g)
Performs the actual painting of the overlay.- Specified by:
doPaintOverlay
in classAbstractImageOverlay
- Parameters:
panel
- the panel this overlay is forg
- the graphics context
-
-