Interface IChip

    • Field Detail

      • DEFAULT

        static final IChip 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.Chip"

        Specified by:
        getWidgetClass in interface IComponent<IChip>
      • getSeverity

        @Nullable
        default java.lang.String getSeverity()
        Returns the severity (color theme), or null when it was reset to the default.

        Default: "info".

      • withSeverity

        IChip withSeverity​(@Nullable
                           java.lang.String severity)
        Returns a copy of this immutable component with the specified severity.

        Sets the severity (color theme).

        Parameters:
        severity - one of "info", "success", "warning", "error" or "neutral".

        Default: "info".

        Returns:
        A modified copy of the this object
      • getSize

        @Nullable
        default java.lang.String getSize()
        Returns the size of this chip, or null when it was reset to the default.

        Default: "medium". Medium maps to the default 22px row, small reduces the row height for dense layouts.

      • withSize

        IChip withSize​(@Nullable
                       java.lang.String size)
        Returns a copy of this immutable component with the specified size.

        Sets the chip size.

        Parameters:
        size - "small" or "medium".

        Default: "medium".

        Returns:
        A modified copy of the this object
      • isRounded

        default boolean isRounded()
        Returns whether this chip is rounded (pill-shaped).

        Default: false.

      • withRounded

        IChip withRounded​(boolean rounded)
        Returns a copy of this immutable component with the specified rounded.

        Sets whether this chip is rounded (pill-shaped).

        Parameters:
        rounded - whether the chip is rounded.

        Default: false.

        Returns:
        A modified copy of the this object
      • isClosable

        default boolean isClosable()
        Returns whether this chip displays a close button.

        Default: false.

      • withClosable

        IChip withClosable​(boolean closable)
        Returns a copy of this immutable component with the specified closable.

        Sets whether this chip displays a close button.

        Parameters:
        closable - whether the chip displays a close button.

        Default: false.

        Returns:
        A modified copy of the this object
      • of

        static IChip of​(java.lang.String label)
        Returns the instance with the given label.
        Parameters:
        label - The label of the chip
      • ofId

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