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
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
-
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.
-
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 allWidget
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
-
-
-
-
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.
-
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 Detail
-
CmsToolbar
public CmsToolbar()
Constructor.
-
-
Method Detail
-
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, java.lang.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
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 allWidget
added to the tool-bar in order of addition first left than right.- Returns:
- all added Widgets
-
getQuickLauncher
public CmsQuickLauncher getQuickLauncher()
Returns the quick launcher.- Returns:
- the quick launch menu button
-
getUserInfo
public CmsUserInfo 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 addindex
- 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 addindex
- the before index
-
setAppTitle
public void setAppTitle(java.lang.String title)
Sets the toolbar title label.- Parameters:
title
- the title
-
setQuickLaunchHandler
public void setQuickLaunchHandler(CmsQuickLauncher.I_QuickLaunchHandler quicklaunchHandler)
Sets the handler for the quick launch menu and turns that menu visible.- Parameters:
quicklaunchHandler
- the quick launch handler
-
-