Interface ILabel

    • Field Detail

      • DEFAULT

        static final ILabel DEFAULT
        Constant for default attributes of this immutable component.
    • Method Detail

      • getWidgetClass

        default java.lang.String getWidgetClass()
        Returns the client widget class.

        Default: "zul.wgt.Label"

        Specified by:
        getWidgetClass in interface IComponent<ILabel>
      • getValue

        default java.lang.String getValue()
        Returns the value.

        Default: "".

      • withValue

        ILabel withValue​(java.lang.String value)
        Returns a copy of this immutable component with the specified value.

        Sets the value of the component

        Parameters:
        value - The value of the component

        Default: "".

        Returns:
        A modified copy of the this object
      • getMaxlength

        default int getMaxlength()
        Returns the maximal length of the label.

        Default: 0 (means no limitation)

      • withMaxlength

        ILabel withMaxlength​(int maxlength)
        Returns a copy of this immutable component with the specified maxlength.

        Sets the maximal length of the label.

        Parameters:
        maxlength - The maximal length of the label.

        Default: 0.

        Returns:
        A modified copy of the this object
      • isMultiline

        default boolean isMultiline()
        Returns whether to preserve the new line and the white spaces at the beginning of each line.

        Default: false

      • withMultiline

        ILabel withMultiline​(boolean multiline)
        Returns a copy of this immutable component with the specified multiline.

        Sets whether to preserve the new line and the white spaces at the beginning of each line.

        Parameters:
        multiline - Whether to preserve the new line and the white spaces at the beginning of each line.

        Default: false.

        Returns:
        A modified copy of the this object
      • isPre

        default boolean isPre()
        Returns whether to preserve the white spaces, such as space, tab and new line.

        It is the same as style="white-space:pre".

        Note: the new line is preserved either isPre() or isMultiline() returns true.

      • withPre

        ILabel withPre​(boolean pre)
        Returns a copy of this immutable component with the specified pre.

        Sets whether to preserve the white spaces, such as space, tab and new line.

        Parameters:
        pre - Whether to preserve the white spaces, such as space, tab and new line.

        Default: false.

        Returns:
        A modified copy of the this object
      • of

        static ILabel of​(java.lang.String value)
        Returns the instance with the given value.
        Parameters:
        value - The value of the component.
      • ofId

        static ILabel ofId​(java.lang.String id)
        Returns the instance with the given id.
        Parameters:
        id - The id to identify this component