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 classObjectAnnotations.LocatedObjectsPanelThe panel for displaying the located objects.
-
Field Summary
Fields Modifier and Type Field Description protected LocatedObjectsm_Annotationsthe annotations.protected AnnotationCleaner[]m_Cleanersthe cleaners to use.protected AnnotationColors[]m_LabelColorsthe colorizers for the labels.protected LabelPlotter[]m_LabelPlottersthe label plotters.protected AnnotationColors[]m_OutlineColorsthe colorizers for the outline.protected OutlinePlotter[]m_OutlinePlottersthe outline plotters.protected ImagePanel.PaintPanelm_Ownerthe owning panel.protected ObjectAnnotations.LocatedObjectsPanelm_PanelObjectsthe panel with the located objects.protected Stringm_Prefixthe prefix to use.protected AnnotationColors[]m_ShapeColorsthe colorizers for the shape.protected ShapePlotter[]m_ShapePlottersthe shape plotters.protected booleanm_ShowObjectPanelwhether 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 StringcleanersTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected voiddoImageChanged(ImagePanel.PaintPanel panel)Notifies the overlay that the image has changed.protected voiddoPaintObjects(ImagePanel.PaintPanel panel, Graphics g, LocatedObjects annotations)Performs the actual painting of the objects.protected voiddoPaintOverlay(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.LocatedObjectsPanelgetLocatedObjectsPanel()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.PaintPanelgetOwner()Returns the owning panel.StringgetPrefix()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.booleangetShowObjectPanel()Returns whether to show the panel with the located objects.StringglobalInfo()Returns a string describing the object.protected voidinitAnnotations(ImagePanel.PaintPanel panel)Initializes the annotations.StringlabelColorsTipText()Returns the tip text for this property.StringlabelPlottersTipText()Returns the tip text for this property.StringoutlineColorsTipText()Returns the tip text for this property.StringoutlinePlottersTipText()Returns the tip text for this property.voidoverlayAdded(ImagePanel.PaintPanel panel)Gets called when the image overlay got added to a paintable panel.voidoverlayRemoved(ImagePanel.PaintPanel panel)Gets called when the image overlay got removed from a paintable panel.StringprefixTipText()Returns the tip text for this property.protected voidreset()Resets the scheme.voidsetCleaners(AnnotationCleaner[] value)Sets the cleaners for the annotations.voidsetLabelColors(AnnotationColors[] value)Sets the colorizers for the label plotters.voidsetLabelPlotters(LabelPlotter[] value)Sets the plotters for the labels.voidsetOutlineColors(AnnotationColors[] value)Sets the colorizers for the outline plotters.voidsetOutlinePlotters(OutlinePlotter[] value)Sets the plotters for the outlines.voidsetPrefix(String value)Sets the field prefix used in the report.voidsetShapeColors(AnnotationColors[] value)Sets the colorizers for the shape plotters.voidsetShapePlotters(ShapePlotter[] value)Sets the plotters for the shapes.voidsetShowObjectPanel(boolean value)Sets whether to show the panel with the located panels.StringshapeColorsTipText()Returns the tip text for this property.StringshapePlottersTipText()Returns the tip text for this property.StringshowObjectPanelTipText()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:
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 classAbstractImageOverlay
-
reset
protected void reset()
Resets the scheme.- Overrides:
resetin classAbstractOptionHandler
-
setPrefix
public void setPrefix(String value)
Sets the field prefix used in the report.- Specified by:
setPrefixin interfaceObjectPrefixHandler- Parameters:
value- the field prefix
-
getPrefix
public String getPrefix()
Returns the field prefix used in the report.- Specified by:
getPrefixin interfaceObjectPrefixHandler- Returns:
- the field prefix
-
prefixTipText
public String prefixTipText()
Returns the tip text for this property.- Specified by:
prefixTipTextin 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:
overlayAddedin interfaceImageOverlay- Overrides:
overlayAddedin 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:
overlayRemovedin interfaceImageOverlay- Overrides:
overlayRemovedin 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:
doImageChangedin 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:
doPaintOverlayin classAbstractImageOverlay- Parameters:
panel- the panel this overlay is forg- the graphics context
-
-