Interface StaticTextData

  • All Known Subinterfaces:
    StaticTextHandler
    All Known Implementing Classes:
    StaticTextDataImpl

    public interface StaticTextData

    Definition of an interface for describing the properties of a static text element.

    A static text is an element that appears like a label, but can be changed after the GUI was created. For this purpose the ComponentHandler of the static text element is used. It maintains a data object of the type of this interface. The methods defined by this interface can then be used to query the current properties of the static text or modify them.

    Note: static text elements are created by the StaticTextTag tag handler class.

    Version:
    $Id: StaticTextData.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Method Detail

      • getText

        String getText()
        Returns the text of the affected element.
        Returns:
        the text (can be null if there is no text)
      • setText

        void setText​(String s)
        Sets the text of the affected element.
        Parameters:
        s - the new text
      • getIcon

        Object getIcon()
        Returns the icon of the affected element.
        Returns:
        the icon (can be null if none was defined)
      • setIcon

        void setIcon​(Object icon)
        Sets the icon of the affected element. The passed in object must be a valid icon that is compatible with the used GUI library. It may have been created using the IconTag tag handler class for instance.
        Parameters:
        icon - the icon
      • getAlignment

        TextIconAlignment getAlignment()
        Returns the alignment of the text and the icon.
        Returns:
        the alignment
      • setAlignment

        void setAlignment​(TextIconAlignment alignment)
        Sets the alignment of the text and the icon.
        Parameters:
        alignment - the new alignment (must not be null)