Class CmsContextMenuItem

  • All Implemented Interfaces:,,,,,,,,,,,,

    public final class CmsContextMenuItem
    extends A_CmsContextMenuItem
    An entry in a CmsContextMenu. Menu items can either fire a Command when they are clicked, or open a cascading sub-menu.

    This implementation of the abstract context menu item provides a possible image in front of the text and a arrow for a sub menu entry.

    Furthermore constructs the HTML for such a menu entry.

    version 8.0.0
    • Nested Class Summary

      • Nested classes/interfaces inherited from class,
    • Field Summary

      • Fields inherited from class

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String getMenuItemHtml​(boolean hasSubMenu)
      Generates the HTML for a menu item.
      void onClick​( event)
      The action that is executed on click depends on the concrete implementation of a menu item.
      • Methods inherited from class

        claimElement, getWidget, initializeClaimedElement, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
      • Methods inherited from class

        addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
      • Methods inherited from class

        addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface

    • Method Detail

      • onClick

        public void onClick​( event)
        Description copied from class: A_CmsContextMenuItem
        The action that is executed on click depends on the concrete implementation of a menu item. So the onClick Method has to be implemented in the sub class.

        Specified by:
        onClick in interface
        Specified by:
        onClick in class A_CmsContextMenuItem
        See Also:
      • getMenuItemHtml

        protected java.lang.String getMenuItemHtml​(boolean hasSubMenu)
        Generates the HTML for a menu item.

        hasSubMenu - signals if this menu has a sub menu
        the HTML for the menu item