Class Anchored
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.object.objectannotations.label.AbstractLabelPlotter
-
- adams.gui.visualization.object.objectannotations.label.Anchored
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,LabelPlotter,Serializable
public class Anchored extends AbstractLabelPlotter
Plots the label relative to the anchor.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnchored.AnchorReferencewhat to use as reference for the anchor.
-
Field Summary
Fields Modifier and Type Field Description protected ImageAnchorm_Anchorthe label anchor.protected Fontm_Fontthe label font.protected Stringm_Formatthe label for the rectangles.protected Stringm_MetaDataKeythe key in the meta-data that contains the type.protected intm_OffsetXthe x offset for the label.protected intm_OffsetYthe y offset for the label.protected Anchored.AnchorReferencem_Referencethe anchor reference.-
Fields inherited from class adams.gui.visualization.object.objectannotations.label.AbstractLabelPlotter
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 Anchored()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringanchorTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected voiddoPlotLabel(LocatedObject object, Color color, Graphics2D g)Plots the label.StringfontTipText()Returns the tip text for this property.StringformatTipText()Returns the tip text for this property.protected StringgenerateQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.ImageAnchorgetAnchor()Returns the anchor for the label.FontgetFont()Returns the label font.StringgetFormat()Returns the label format.StringgetMetaDataKey()Returns the key in the meta-data of the object that contains the type.intgetOffsetX()Returns the X offset for the label.intgetOffsetY()Returns the Y offset for the label.Anchored.AnchorReferencegetReference()Returns the reference for the anchor.StringglobalInfo()Returns a string describing the object.StringmetaDataKeyTipText()Returns the tip text for this property.StringoffsetXTipText()Returns the tip text for this property.StringoffsetYTipText()Returns the tip text for this property.StringreferenceTipText()Returns the tip text for this property.voidsetAnchor(ImageAnchor value)Sets the anchor for the label.voidsetFont(Font value)Sets the label font.voidsetFormat(String value)Sets the label format.voidsetMetaDataKey(String value)Sets the key in the meta-data of the object that contains the type.voidsetOffsetX(int value)Sets the X offset for the label.voidsetOffsetY(int value)Sets the Y offset for the label.voidsetReference(Anchored.AnchorReference value)Sets the reference for the anchor.-
Methods inherited from class adams.gui.visualization.object.objectannotations.label.AbstractLabelPlotter
enabledTipText, getEnabled, getQuickInfo, plotLabel, setEnabled
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, 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
-
-
-
-
Field Detail
-
m_MetaDataKey
protected String m_MetaDataKey
the key in the meta-data that contains the type.
-
m_Format
protected String m_Format
the label for the rectangles.
-
m_Font
protected Font m_Font
the label font.
-
m_Reference
protected Anchored.AnchorReference m_Reference
the anchor reference.
-
m_Anchor
protected ImageAnchor m_Anchor
the label anchor.
-
m_OffsetX
protected int m_OffsetX
the x offset for the label.
-
m_OffsetY
protected int m_OffsetY
the y offset for the label.
-
-
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 classAbstractLabelPlotter
-
setMetaDataKey
public void setMetaDataKey(String value)
Sets the key in the meta-data of the object that contains the type.- Parameters:
value- the key
-
getMetaDataKey
public String getMetaDataKey()
Returns the key in the meta-data of the object that contains the type.- Returns:
- the key
-
metaDataKeyTipText
public String metaDataKeyTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFormat
public void setFormat(String value)
Sets the label format.- Parameters:
value- the label format
-
getFormat
public String getFormat()
Returns the label format.- Returns:
- the label format
-
formatTipText
public String formatTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFont
public void setFont(Font value)
Sets the label font.- Parameters:
value- the label font
-
getFont
public Font getFont()
Returns the label font.- Returns:
- the label font
-
fontTipText
public String fontTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setReference
public void setReference(Anchored.AnchorReference value)
Sets the reference for the anchor.- Parameters:
value- the reference
-
getReference
public Anchored.AnchorReference getReference()
Returns the reference for the anchor.- Returns:
- the reference
-
referenceTipText
public String referenceTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setAnchor
public void setAnchor(ImageAnchor value)
Sets the anchor for the label.- Parameters:
value- the anchor
-
getAnchor
public ImageAnchor getAnchor()
Returns the anchor for the label.- Returns:
- the anchor
-
anchorTipText
public String anchorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOffsetX
public void setOffsetX(int value)
Sets the X offset for the label.- Parameters:
value- the X offset
-
getOffsetX
public int getOffsetX()
Returns the X offset for the label.- Returns:
- the X offset
-
offsetXTipText
public String offsetXTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOffsetY
public void setOffsetY(int value)
Sets the Y offset for the label.- Parameters:
value- the Y offset
-
getOffsetY
public int getOffsetY()
Returns the Y offset for the label.- Returns:
- the Y offset
-
offsetYTipText
public String offsetYTipText()
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:
generateQuickInfoin classAbstractLabelPlotter- Returns:
- null if no info available, otherwise short string
-
doPlotLabel
protected void doPlotLabel(LocatedObject object, Color color, Graphics2D g)
Plots the label.- Specified by:
doPlotLabelin classAbstractLabelPlotter- Parameters:
object- the object to plotcolor- the color to useg- the graphics context
-
-