Class TextMapOverlay

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, Serializable

    public class TextMapOverlay
    extends AbstractPositionableMapOverlayWithDimensions
    Displays text, either fixed, from a variable or from storage.
    Precedence: fixed > variable > storage

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -enabled <boolean> (property: enabled)
        If enabled, the overlay gets painted.
        default: true
     
    -x <int> (property: x)
        The X position of the overlay (>=0: absolute, -1: left, -2: center, -3: 
        right).
        default: -3
        minimum: -3
     
    -y <int> (property: y)
        The Y position of the overlay (>=0: absolute, -1: top, -2: center, -3: bottom
        ).
        default: -1
        minimum: -3
     
    -width <int> (property: width)
        The width of the bounding box around the text.
        default: 100
        minimum: -1
     
    -height <int> (property: height)
        The height of the bounding box around the text.
        default: 20
        minimum: -1
     
    -offset-x <int> (property: offsetX)
        The X offset for the text.
        default: 4
     
    -offset-y <int> (property: offsetY)
        The Y offset for the text.
        default: -4
     
    -text <java.lang.String> (property: text)
        The fixed text to output.
        default: 
     
    -storage-name <adams.flow.control.StorageName> (property: storageName)
        The name of the storage item to output.
        default: null
     
    -variable-name <adams.core.VariableName> (property: variableName)
        The variable to use for the filename instead of the auto-generated one.
        default: variable
     
    -text-color <java.awt.Color> (property: textColor)
        The text color.
        default: #000000
     
    -font <java.awt.Font> (property: font)
        The font to use for the text.
        default: helvetica-PLAIN-12
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_OffsetX

        protected int m_OffsetX
        the X offset of the overlay.
      • m_OffsetY

        protected int m_OffsetY
        the Y offset of the overlay.
      • m_Text

        protected String m_Text
        the fixed text.
      • m_VariableName

        protected adams.core.VariableName m_VariableName
        the variable to obtain the text from.
      • m_StorageName

        protected adams.flow.control.StorageName m_StorageName
        the storage item to output.
      • m_TextColor

        protected Color m_TextColor
        the color of the text.
      • m_Font

        protected Font m_Font
        the font to use.
    • Constructor Detail

      • TextMapOverlay

        public TextMapOverlay()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • setOffsetX

        public void setOffsetX​(int value)
        Sets the X offset for the text.
        Parameters:
        value - the X offset
      • getOffsetX

        public int getOffsetX()
        Returns the currently set X offset for the text.
        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 of the text.
        Parameters:
        value - the Y offset
      • getOffsetY

        public int getOffsetY()
        Returns the currently set Y offset of the text.
        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.
      • setText

        public void setText​(String value)
        Sets the fixed text to output.
        Parameters:
        value - the text
      • getText

        public String getText()
        Returns the fixed text to output.
        Returns:
        the text
      • textTipText

        public String textTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setStorageName

        public void setStorageName​(adams.flow.control.StorageName value)
        Sets the name for the hashset in the internal storage.
        Parameters:
        value - the name
      • getStorageName

        public adams.flow.control.StorageName getStorageName()
        Returns the name for the hashset in the internal storage.
        Returns:
        the name
      • storageNameTipText

        public String storageNameTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setVariableName

        public void setVariableName​(adams.core.VariableName value)
        Sets the variable to use for outputting the text.
        Parameters:
        value - the variable to use (without the @{ and })
      • getVariableName

        public adams.core.VariableName getVariableName()
        Returns the variable to use for outputting the text.
        Returns:
        the variable to use (without the @{ and })
      • variableNameTipText

        public String variableNameTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setTextColor

        public void setTextColor​(Color value)
        Sets the color for the text.
        Parameters:
        value - the text color
      • getTextColor

        public Color getTextColor()
        Returns the color for the text.
        Returns:
        the text color
      • textColorTipText

        public String textColorTipText()
        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 font for the text.
        Parameters:
        value - the font
      • getFont

        public Font getFont()
        Returns the font for the text.
        Returns:
        the 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.