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.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.protected CmsQuickLauncher
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
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>
getAll()
Returns allWidget
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
setAppTitle
(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, 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
-
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_toolbarCenter
Center of the toolbar, normally for displaying the logo, but the content can be changed. -
m_quickLauncher
The quick launcher (initially invisible). -
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 allWidget
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
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
-
setQuickLaunchHandler
Sets the handler for the quick launch menu and turns that menu visible.- Parameters:
quicklaunchHandler
- the quick launch handler
-