Class LabelState

All Implemented Interfaces:
UIKeyHandler, Hintable, Savable

public class LabelState extends UIState
A state useful for maintaining and setting label properties such as text, icon, gap, and alignment.
  • Field Details

    • _text

      protected String _text
      Text to set on component, or null if to leave unchanged.
    • _icon

      protected SubTex _icon
      Icon to set on component, or null if to leave unchanged.
    • _iconDimensions

      protected Dimension _iconDimensions
      Icon size to set on component, or null if to leave unchanged.
    • _alignment

      protected Alignment _alignment
      Alignment to set on component, or null if to leave unchanged.
    • _gap

      protected Integer _gap
      Gap to set on component, or null if to leave unchanged.
    • _styled

      protected Boolean _styled
      If true, our text could be marked up with style information - null to leave unchanged.
  • Constructor Details

    • LabelState

      public LabelState()
  • Method Details

    • setupAppearance

      public void setupAppearance(UIComponent component)
      Description copied from class: UIState
      Applies the local characteristics of this state to the given UIComponent.
      Overrides:
      setupAppearance in class UIState
      Parameters:
      component - the UI component to apply this state to
    • getAlignment

      public Alignment getAlignment()
    • setAlignment

      public void setAlignment(Alignment align)
    • getGap

      public Integer getGap()
    • setGap

      public void setGap(int gap)
    • getIcon

      public SubTex getIcon()
    • setIcon

      public void setIcon(SubTex icon)
    • getIconDimensions

      public Dimension getIconDimensions()
    • setIconDimensions

      public void setIconDimensions(Dimension iconDimensions)
    • getText

      public String getText()
    • setText

      public void setText(String text)
    • isStyledText

      public Boolean isStyledText()
    • setStyledText

      public void setStyledText(Boolean value)