Class TextStyle.Builder

  • All Implemented Interfaces:
    java.util.function.Supplier<TextStyle>
    Enclosing class:
    TextStyle

    public static final class TextStyle.Builder
    extends java.lang.Object
    implements java.util.function.Supplier<TextStyle>
    The builder for the TextStyle. The default values are:
    • alignment = LEFT
    • leftPad = 0
    • scaling = VARIABLE
    • minWidth = 0
    • maxWidth = UNSET_MAX_WIDTH
    • Method Detail

      • getIndent

        public int getIndent()
        Gets the currently specified indent value.
        Returns:
        The currently specified indent value.
      • getLeftPad

        public int getLeftPad()
        Gets the currently specified leftPad.
        Returns:
        The currently specified leftPad.
      • getMaxWidth

        public int getMaxWidth()
        Gets the currently specified maximum width value.
        Returns:
        The currently specified maximum width value.
      • getMinWidth

        public int getMinWidth()
        Gets the currently specified minimum width value.
        Returns:
        The currently specified minimum width value.
      • isScalable

        public boolean isScalable()
        Specifies if the column can be made wider or to narrower width to fit constraints of the HelpAppendable and formatting.
        Returns:
        The currently specified scaling value.
      • setIndent

        public TextStyle.Builder setIndent​(int indent)
        Sets the indent value.
        Parameters:
        indent - the new indent value.
        Returns:
        this
      • setLeftPad

        public TextStyle.Builder setLeftPad​(int leftPad)
        Sets the left padding.
        Parameters:
        leftPad - the new left padding.
        Returns:
        this
      • setMaxWidth

        public TextStyle.Builder setMaxWidth​(int maxWidth)
        Sets the currently specified minimum width.
        Parameters:
        maxWidth - The currently specified maximum width.
        Returns:
        this
      • setMinWidth

        public TextStyle.Builder setMinWidth​(int minWidth)
        Sets the currently specified minimum width.
        Parameters:
        minWidth - The currently specified minimum width.
        Returns:
        this
      • setScalable

        public TextStyle.Builder setScalable​(boolean scalable)
        Sets whether the column can be made wider or to narrower width to fit constraints of the HelpAppendable and formatting.
        Parameters:
        scalable - Whether the text width can be adjusted.
        Returns:
        this instance.