Class CmsToolbar

java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
org.opencms.gwt.client.ui.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 
     

    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
    Holds left-side buttons associated with the tool-bar.
    protected com.google.gwt.user.client.ui.FlowPanel
    Holds right-side buttons associated with the tool-bar.
    The quick launcher (initially invisible).
    protected com.google.gwt.user.client.ui.FlowPanel
    Center of the toolbar, normally for displaying the logo, but the content can be changed.
    protected CmsUserInfo
    The user info button HTML.

    Fields inherited from class com.google.gwt.user.client.ui.UIObject

    DEBUG_ID_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    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.
    List<com.google.gwt.user.client.ui.Widget>
    Returns all Widget added to the tool-bar in order of addition first left than right.
    Returns the quick launcher.
    com.google.gwt.user.client.ui.FlowPanel
    Gets the center area of the toolbar, which normally contains the logo.
    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
    Sets the toolbar title label.
    void
    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, 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 Details

    • 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.
    • m_toolbarCenter

      @UiField protected com.google.gwt.user.client.ui.FlowPanel m_toolbarCenter
      Center of the toolbar, normally for displaying the logo, but the content can be changed.
    • m_quickLauncher

      @UiField protected CmsQuickLauncher m_quickLauncher
      The quick launcher (initially invisible).
    • m_userInfo

      @UiField protected CmsUserInfo m_userInfo
      The user info button HTML.
  • Constructor Details

  • Method Details

    • 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, 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 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
    • getQuickLauncher

      Returns the quick launcher.

      Returns:
      the quick launch menu button
    • getToolbarCenter

      public com.google.gwt.user.client.ui.FlowPanel getToolbarCenter()
      Gets the center area of the toolbar, which normally contains the logo.
      Returns:
      the center toolbar area
    • getUserInfo

      Returns the user info button.

      Returns:
      the user info button
    • 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(String title)
      Sets the toolbar title label.

      Parameters:
      title - the title
    • setQuickLaunchHandler

      Sets the handler for the quick launch menu and turns that menu visible.

      Parameters:
      quicklaunchHandler - the quick launch handler