Class LabelSection


  • public final class LabelSection
    extends SingleRowSection
    A single line of static or settable text, with optional horizontal alignment.
    • Constructor Detail

      • LabelSection

        public LabelSection​(java.lang.String text)
        Creates a label with the given text. A null text is treated as empty.
        Parameters:
        text - the label text
    • Method Detail

      • setText

        public LabelSection setText​(java.lang.String text)
        Sets the label text. A null text is treated as empty.
        Parameters:
        text - the new text
        Returns:
        this LabelSection for chaining
      • alignment

        public LabelSection alignment​(Alignment alignment)
        Sets the horizontal alignment.
        Parameters:
        alignment - the alignment
        Returns:
        this LabelSection for chaining
      • style

        public LabelSection style​(Style style)
        Sets the text style.
        Parameters:
        style - the style
        Returns:
        this LabelSection for chaining
      • text

        public java.lang.String text()
        Returns:
        the current text