Package tripleplay.ui

Class Label

Direct Known Subclasses:
HistoryGroup.RenderableLabel

public class Label extends TextWidget<Label>
A widget that displays one or more lines of text and/or an icon image.
  • Field Details

    • text

      public final react.Value<String> text
      The text displayed by this widget, or null.
    • icon

      public final react.Value<Icon> icon
      The icon displayed by this widget, or null.
  • Constructor Details

    • Label

      public Label()
      Creates a label with no text or icon.
    • Label

      public Label(String text)
      Creates a label with the supplied text.
    • Label

      public Label(Icon icon)
      Creates a label with the supplied icon.
    • Label

      public Label(String text, Icon icon)
      Creates a label with the supplied text and icon.
    • Label

      public Label(react.ValueView<?> text)
      Creates a label and calls bindText(react.ValueView<?>) with text.
  • Method Details

    • bindText

      public Label bindText(react.ValueView<?> textV)
      Binds the text of this label to the supplied reactive value. The current text will be adjusted to match the state of text.
    • bindIcon

      public Label bindIcon(react.ValueView<Icon> iconV)
      Binds the icon of this label to the supplied reactive value. The current icon will be adjusted to match the state of icon.
    • setText

      public Label setText(String text)
      Updates the text displayed by this label.
    • setIcon

      public Label setIcon(Icon icon)
      Updates the icon displayed by this label.
    • toString

      public String toString()
      Overrides:
      toString in class Object