Class CmsToolbar

  • All Implemented Interfaces:
    com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget
    Direct Known Subclasses:
    CmsSitemapToolbar

    public class CmsToolbar
    extends com.google.gwt.user.client.ui.Composite
    Provides a tool-bar to be shown at the top of a page.

    Since:
    8.0.0
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected static interface  CmsToolbar.I_CmsToolbarUiBinder  
      • Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

        com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected com.google.gwt.user.client.ui.FlowPanel m_buttonPanelLeft
      Holds left-side buttons associated with the tool-bar.
      protected com.google.gwt.user.client.ui.FlowPanel m_buttonPanelRight
      Holds right-side buttons associated with the tool-bar.
      protected CmsQuickLauncher m_quickLauncher
      The quick launcher (initially invisible).
      protected CmsUserInfo m_userInfo
      The user info button HTML.
      • Fields inherited from class com.google.gwt.user.client.ui.UIObject

        DEBUG_ID_PREFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsToolbar()
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addLeft​(com.google.gwt.user.client.ui.Widget widget)
      Adds a widget to the left button panel.
      void addRight​(com.google.gwt.user.client.ui.Widget widget)
      Adds a widget to the left button panel.
      java.util.List<com.google.gwt.user.client.ui.Widget> getAll()
      Returns all Widget added to the tool-bar in order of addition first left than right.
      CmsQuickLauncher getQuickLauncher()
      Returns the quick launcher.
      CmsUserInfo getUserInfo()
      Returns the user info button.
      void insertLeft​(com.google.gwt.user.client.ui.Widget widget, int index)
      Inserts a widget into the left button panel.
      void insertRight​(com.google.gwt.user.client.ui.Widget widget, int index)
      Inserts a widget into the left button panel.
      void setAppTitle​(java.lang.String title)
      Sets the toolbar title label.
      void setQuickLaunchHandler​(CmsQuickLauncher.I_QuickLaunchHandler quicklaunchHandler)
      Sets the handler for the quick launch menu and turns that menu visible.
      static void showToolbar​(CmsToolbar toolbar, boolean show, CmsStyleVariable toolbarVisibility)
      Helper method for setting toolbar visibility.
      static void showToolbar​(CmsToolbar toolbar, boolean show, CmsStyleVariable toolbarVisibility, java.lang.String showClass)
      Helper method for setting toolbar visibility.
      • Methods inherited from class com.google.gwt.user.client.ui.Composite

        claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
      • Methods inherited from class com.google.gwt.user.client.ui.Widget

        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 com.google.gwt.user.client.ui.UIObject

        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
    • Field Detail

      • m_buttonPanelLeft

        @UiField
        protected com.google.gwt.user.client.ui.FlowPanel m_buttonPanelLeft
        Holds left-side buttons associated with the tool-bar.
      • m_buttonPanelRight

        @UiField
        protected com.google.gwt.user.client.ui.FlowPanel m_buttonPanelRight
        Holds right-side buttons associated with the tool-bar.
    • Constructor Detail

    • Method Detail

      • showToolbar

        public static void showToolbar​(CmsToolbar toolbar,
                                       boolean show,
                                       CmsStyleVariable toolbarVisibility)
        Helper method for setting toolbar visibility.

        Parameters:
        toolbar - the toolbar
        show - true if the toolbar should be shown
        toolbarVisibility - the style variable controlling the toolbar visibility
      • showToolbar

        public static void showToolbar​(CmsToolbar toolbar,
                                       boolean show,
                                       CmsStyleVariable toolbarVisibility,
                                       java.lang.String showClass)
        Helper method for setting toolbar visibility.

        Parameters:
        toolbar - the toolbar
        show - true if the toolbar should be shown
        toolbarVisibility - the style variable controlling the toolbar visibility
        showClass - the class which should be used for showing the toolbar
      • addLeft

        public void addLeft​(com.google.gwt.user.client.ui.Widget widget)
        Adds a widget to the left button panel.

        Parameters:
        widget - the widget to add
      • addRight

        public void addRight​(com.google.gwt.user.client.ui.Widget widget)
        Adds a widget to the left button panel.

        Parameters:
        widget - the widget to add
      • getAll

        public java.util.List<com.google.gwt.user.client.ui.Widget> getAll()
        Returns all Widget added to the tool-bar in order of addition first left than right.

        Returns:
        all added Widgets
      • insertLeft

        public void insertLeft​(com.google.gwt.user.client.ui.Widget widget,
                               int index)
        Inserts a widget into the left button panel.

        Parameters:
        widget - the widget to add
        index - the before index
      • insertRight

        public void insertRight​(com.google.gwt.user.client.ui.Widget widget,
                                int index)
        Inserts a widget into the left button panel.

        Parameters:
        widget - the widget to add
        index - the before index
      • setAppTitle

        public void setAppTitle​(java.lang.String title)
        Sets the toolbar title label.

        Parameters:
        title - the title