Class Label

    • Constructor Detail

      • Label

        public Label()
      • Label

        public Label​(java.lang.String text)
    • Method Detail

      • getText

        public java.lang.String getText()
        Returns:
        The label's text.
      • setText

        public void setText​(java.lang.String text)
        Set the text of the Label.
        Parameters:
        text - The text to set, must be not null.
        Throws:
        java.lang.IllegalArgumentException - if the text is null or if the text length exceeds the allowed maximum.
      • setTextOrEmpty

        public void setTextOrEmpty​(java.lang.String text)
        Utility method to set text to the given value, or to an empty string if null (to avoid the setText throw an IllegalArgumentException). This is useful to be called by code.
        Parameters:
        text - The text to set (if null will set an empty string "").
        See Also:
        setText(java.lang.String)
      • getTextKey

        public java.lang.String getTextKey()
        Returns the label's text key.
        Returns:
        The text key, or null if no text key is set.
      • getMaximumLength

        public int getMaximumLength()
        Returns:
        The maximum length of the label text.
      • setMaximumLength

        public void setMaximumLength​(int maximumLength)
        Sets the maximum length of the label text.
        Parameters:
        maximumLength - The maximum length of the label text.
        Throws:
        java.lang.IllegalArgumentException - if the length given is negative.
      • setTextKey

        public void setTextKey​(java.lang.String textKey)
        Sets the label's text key.
        Parameters:
        textKey - The text key, or null to clear the binding.
      • getTextBindType

        public BindType getTextBindType()
      • setTextBindType

        public void setTextBindType​(BindType textBindType)
      • load

        public void load​(java.lang.Object context)
        Description copied from class: Component
        Copies bound values from the bind context to the component. This functionality must be provided by the subclass; the base implementation is a no-op.
        Overrides:
        load in class Component
        Parameters:
        context - The object to load the bound values from.
      • store

        public void store​(java.lang.Object context)
        Description copied from class: Component
        Copies bound values from the component to the bind context. This functionality must be provided by the subclass; the base implementation is a no-op.
        Overrides:
        store in class Component
        Parameters:
        context - The object to store the bound values into.
      • clear

        public void clear()
        Description copied from class: Component
        Clears any bound values in the component. This functionality must be provided by the subclass; the base implementation is a no-op.
        Overrides:
        clear in class Component
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Component