Interface IRating

    • Field Detail

      • DEFAULT

        static final IRating 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.Rating"

        Specified by:
        getWidgetClass in interface IComponent<IRating>
      • getMax

        default int getMax()
        Returns the max rating of this rating component. Default: 5
      • withMax

        IRating withMax​(int max)
        Returns a copy of this immutable component with the specified max.

        Sets the max rating of this rating component

        Parameters:
        max - The max rating of this rating component

        Default: 5.

        Returns:
        A modified copy of the this object
      • getRating

        default int getRating()
        Returns the rating.

        Default: 0

      • withRating

        IRating withRating​(int rating)
        Returns a copy of this immutable component with the specified rating.

        Sets the rating.

        Parameters:
        rating - Sets the rating.

        Default: 0.

        Returns:
        A modified copy of the this object
      • isReadonly

        default boolean isReadonly()
        Returns if this rating component is readonly.

        Default: false

        Specified by:
        isReadonly in interface IReadonly<IRating>
      • withReadonly

        IRating withReadonly​(boolean readonly)
        Returns a copy of this immutable component with the specified readonly.

        Sets if this rating component is readonly.

        Specified by:
        withReadonly in interface IReadonly<IRating>
        Parameters:
        readonly - Whether this rating component is readonly.

        Default: false.

        Returns:
        A modified copy of the this object
      • isCancelable

        default boolean isCancelable()
        Returns whether this rating component is cancelable. If true, the rating could be cancelled by clicking the rated-rating again.

        Default: true

      • withCancelable

        IRating withCancelable​(boolean cancelable)
        Returns a copy of this immutable component with the specified cancelable.

        Sets whether this rating component is cancelable.

        Parameters:
        cancelable - Whether this rating component is cancelable.

        Default: true.

        Returns:
        A modified copy of the this object
      • getOrient

        default java.lang.String getOrient()
        Returns the orient.

        Default: "horizontal".

      • withOrient

        IRating withOrient​(java.lang.String orient)
        Returns a copy of this immutable component with the specified orient.

        Sets the orient.

        Parameters:
        orient - Either "horizontal" or "vertical"

        Default: "horizontal".

        Returns:
        A modified copy of the this object
      • withOrient

        default IRating withOrient​(IRating.Orient orient)
        Returns a copy of this immutable component with the specified orient.

        Sets the orient.

        Parameters:
        orient - Either "horizontal" or "vertical"

        Default: "horizontal".

        Returns:
        A modified copy of the this object
      • getIconSclass

        default java.lang.String getIconSclass()
        Returns the iconSclass name of this rating.

        Default: "z-icon-star"

      • withIconSclass

        IRating withIconSclass​(java.lang.String iconSclass)
        Returns a copy of this immutable component with the specified iconSclass.

        Sets the iconSclass name of this rating.

        Parameters:
        iconSclass - The iconSclass name of this rating.

        Default: "z-icon-star".

        Returns:
        A modified copy of the this object
      • of

        static IRating of​(int rating)
        Returns the instance with the given rating.
        Parameters:
        rating - The rating of the component.
      • ofMax

        static IRating ofMax​(int max)
        Returns the instance with the given max
        Parameters:
        max - The maximum value of the rating.
      • ofId

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