Interface IMenu

    • Field Detail

      • DEFAULT

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

      • getWidgetClass

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

        Default: "zul.menu.Menu"

        Specified by:
        getWidgetClass in interface IComponent<IMenu>
      • getContent

        default java.lang.String getContent()
        Returns the embedded content (i.e., HTML tags) that is shown as part of the description.

        It is useful to show the description in more versatile way.

        Default: "" (empty).

      • withContent

        IMenu withContent​(java.lang.String content)
        Returns a copy of this immutable component with the specified label.

        Sets the embedded content (i.e., HTML tags) that is shown as part of the description.

        It is useful to show the description in more versatile way.

        There is a way to create Colorbox automatically by using #color=#RRGGBB, usage example withContent("#color=#FFFFFF")

        Note: the content is sanitized by default to avoid XSS attack, and please don't use JavaScript in the content.

        Parameters:
        content - The embedded content

        Default: "".

        Returns:
        A modified copy of the this object
      • of

        static IMenu of​(java.lang.String label,
                        IMenupopup child)
        Returns the instance with the given label and a popup child.
        Parameters:
        label - The label of the menu.
        child - The menupopup child.
      • ofId

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

        static IMenu of​(java.lang.String label,
                        java.lang.String image)
        Returns the instance with the given label and image.
        Parameters:
        label - The label that the menu holds.
        image - The image that the menu holds.
      • ofImage

        static IMenu ofImage​(java.lang.String image)
        Returns the instance with the given image.
        Parameters:
        image - The image that the menu holds.