Package org.opencms.gwt.client.ui
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
Provides a tool-bar to be shown at the top of a page.
- Since:
- 8.0.0
-
Nested Class Summary
Nested ClassesNested 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
FieldsModifier and TypeFieldDescriptionprotected com.google.gwt.user.client.ui.FlowPanelHolds left-side buttons associated with the tool-bar.protected com.google.gwt.user.client.ui.FlowPanelHolds right-side buttons associated with the tool-bar.protected CmsQuickLauncherThe quick launcher (initially invisible).protected com.google.gwt.user.client.ui.FlowPanelCenter of the toolbar, normally for displaying the logo, but the content can be changed.protected CmsUserInfoThe user info button HTML.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLeft(com.google.gwt.user.client.ui.Widget widget) Adds a widget to the left button panel.voidaddRight(com.google.gwt.user.client.ui.Widget widget) Adds a widget to the left button panel.List<com.google.gwt.user.client.ui.Widget> getAll()Returns allWidgetadded to the tool-bar in order of addition first left than right.Returns the quick launcher.com.google.gwt.user.client.ui.FlowPanelGets the center area of the toolbar, which normally contains the logo.Returns the user info button.voidinsertLeft(com.google.gwt.user.client.ui.Widget widget, int index) Inserts a widget into the left button panel.voidinsertRight(com.google.gwt.user.client.ui.Widget widget, int index) Inserts a widget into the left button panel.voidsetAppTitle(String title) Sets the toolbar title label.voidsetComplexTitle(String top, String bottom) Sets a two-line title.voidsetQuickLaunchHandler(CmsQuickLauncher.I_QuickLaunchHandler quicklaunchHandler) Sets the handler for the quick launch menu and turns that menu visible.static voidshowToolbar(CmsToolbar toolbar, boolean show, CmsStyleVariable toolbarVisibility) Helper method for setting toolbar visibility.static voidshowToolbar(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, setWidgetMethods 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, unsinkEventsMethods 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
-
Field Details
-
m_buttonPanelLeft
Holds left-side buttons associated with the tool-bar. -
m_buttonPanelRight
Holds right-side buttons associated with the tool-bar. -
m_quickLauncher
The quick launcher (initially invisible). -
m_toolbarCenter
Center of the toolbar, normally for displaying the logo, but the content can be changed. -
m_userInfo
The user info button HTML.
-
-
Constructor Details
-
CmsToolbar
public CmsToolbar()Constructor.
-
-
Method Details
-
showToolbar
public static void showToolbar(CmsToolbar toolbar, boolean show, CmsStyleVariable toolbarVisibility) Helper method for setting toolbar visibility.- Parameters:
toolbar- the toolbarshow- true if the toolbar should be showntoolbarVisibility- 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 toolbarshow- true if the toolbar should be showntoolbarVisibility- the style variable controlling the toolbar visibilityshowClass- the class which should be used for showing the toolbar
-
addLeft
Adds a widget to the left button panel.- Parameters:
widget- the widget to add
-
addRight
Adds a widget to the left button panel.- Parameters:
widget- the widget to add
-
getAll
Returns allWidgetadded 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
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
Inserts a widget into the left button panel.- Parameters:
widget- the widget to addindex- the before index
-
insertRight
Inserts a widget into the left button panel.- Parameters:
widget- the widget to addindex- the before index
-
setAppTitle
Sets the toolbar title label.- Parameters:
title- the title
-
setComplexTitle
Sets a two-line title.- Parameters:
top- the top line textbottom- the bottom line text
-
setQuickLaunchHandler
Sets the handler for the quick launch menu and turns that menu visible.- Parameters:
quicklaunchHandler- the quick launch handler
-