public class CmsToolBar extends com.vaadin.ui.CssLayout implements com.vaadin.server.Page.BrowserWindowResizeListener
Modifier and Type | Class and Description |
---|---|
protected class |
CmsToolBar.ToolbarContext
Toolbar dialog context.
|
com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.SpacingHandler
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
Modifier and Type | Field and Description |
---|---|
protected I_CmsAppUIContext |
m_appContext
The app UI context.
|
Constructor and Description |
---|
CmsToolBar()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addButtonLeft(com.vaadin.ui.Component button)
Adds a button to left toolbar side.
|
void |
addButtonRight(com.vaadin.ui.Component button)
Adds a button to right toolbar side.
|
void |
browserWindowResized(com.vaadin.server.Page.BrowserWindowResizeEvent event) |
void |
clearButtonsLeft()
Clears the left toolbar buttons.
|
void |
clearButtonsRight()
Clears the right toolbar buttons.
|
void |
closePopupViews()
Closes all visible popup views.
|
static com.vaadin.ui.Button |
createButton(com.vaadin.server.Resource icon,
java.lang.String title)
Creates a properly styled toolbar button.
|
static com.vaadin.ui.Button |
createButton(com.vaadin.server.Resource icon,
java.lang.String title,
boolean alwaysShow)
Creates a properly styled toolbar button.
|
static com.vaadin.ui.Component |
createDropDown(com.vaadin.server.ExternalResource icon,
com.vaadin.ui.Component content,
java.lang.String title)
Creates a drop down menu.
|
static com.vaadin.ui.Component |
createDropDown(com.vaadin.server.FontIcon icon,
com.vaadin.ui.Component content,
java.lang.String title)
Creates a drop down menu.
|
static com.vaadin.ui.Component |
createDropDown(java.lang.String buttonHtml,
com.vaadin.ui.Component content,
java.lang.String title)
Creates a drop down menu.
|
void |
enableDefaultButtons(boolean enabled)
Enables or removes the default toolbar buttons.
|
protected void |
init(java.lang.String appId,
I_CmsAppUIContext context)
Initializes the toolbar.
|
static void |
openFavoriteDialog(CmsFileExplorer explorer)
Opens the favorite dialog.
|
void |
refreshUserInfoDropDown()
Refreshes the user drop down.
|
void |
removeButton(com.vaadin.ui.Component button)
Removes the given button from the toolbar.
|
void |
setAppContext(I_CmsAppUIContext context)
Sets the app context.
|
void |
setAppTitle(java.lang.String appTitle)
Sets the app title.
|
protected void |
setDialogContext(I_CmsDialogContext context)
Sets the dialog context.
|
void |
updateAppIndicator()
Updates the app indicator site and project info.
|
protected void |
updateButtonVisibility(int width)
Updates the button visibility according o the given widow width.
|
protected void |
updateFoldingThreshhold()
Recalculates the space required by the toolbar buttons.
|
addComponent, addComponent, addComponentAsFirst, addLayoutClickListener, beforeClientResponse, getComponent, getComponentCount, getComponentIndex, getCss, getState, getState, iterator, readDesign, removeComponent, removeLayoutClickListener, replaceComponent, writeDesign
addComponentAttachListener, addComponentDetachListener, addComponents, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, setHeight, setWidth
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthUndefined
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addComponents, getComponentIterator, moveComponentsFrom, removeAllComponents
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible
addAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
protected I_CmsAppUIContext m_appContext
public CmsToolBar()
public static com.vaadin.ui.Button createButton(com.vaadin.server.Resource icon, java.lang.String title)
icon
- the button icontitle
- the button title, will be used for the tooltippublic static com.vaadin.ui.Button createButton(com.vaadin.server.Resource icon, java.lang.String title, boolean alwaysShow)
icon
- the button icontitle
- the button title, will be used for the tooltipalwaysShow
- true
to prevent the button to be folded into a sub menu for small screenspublic static com.vaadin.ui.Component createDropDown(com.vaadin.server.ExternalResource icon, com.vaadin.ui.Component content, java.lang.String title)
icon
- the button iconcontent
- the drop down contenttitle
- the button titlepublic static com.vaadin.ui.Component createDropDown(com.vaadin.server.FontIcon icon, com.vaadin.ui.Component content, java.lang.String title)
icon
- the button iconcontent
- the drop down contenttitle
- the drop down titlepublic static com.vaadin.ui.Component createDropDown(java.lang.String buttonHtml, com.vaadin.ui.Component content, java.lang.String title)
buttonHtml
- the button HTMLcontent
- the drop down contenttitle
- the button titlepublic static void openFavoriteDialog(CmsFileExplorer explorer)
explorer
- the explorer instance (null if not currently in explorer)public void addButtonLeft(com.vaadin.ui.Component button)
button
- the buttonpublic void addButtonRight(com.vaadin.ui.Component button)
button
- the buttonpublic void browserWindowResized(com.vaadin.server.Page.BrowserWindowResizeEvent event)
browserWindowResized
in interface com.vaadin.server.Page.BrowserWindowResizeListener
Page.BrowserWindowResizeListener.browserWindowResized(com.vaadin.server.Page.BrowserWindowResizeEvent)
public void clearButtonsLeft()
public void clearButtonsRight()
public void closePopupViews()
public void enableDefaultButtons(boolean enabled)
These are the context menu and the quick launch drop down.
The default is enabled = true
.
enabled
- true
to enable the buttonspublic void refreshUserInfoDropDown()
public void removeButton(com.vaadin.ui.Component button)
button
- the button to removepublic void setAppContext(I_CmsAppUIContext context)
context
- the app contextpublic void setAppTitle(java.lang.String appTitle)
appTitle
- the app titlepublic void updateAppIndicator()
protected void init(java.lang.String appId, I_CmsAppUIContext context)
appId
- the app idcontext
- the app UI contextprotected void setDialogContext(I_CmsDialogContext context)
context
- the dialog contextprotected void updateButtonVisibility(int width)
width
- the window widthprotected void updateFoldingThreshhold()