Package org.opencms.ui.apps
Interface I_CmsAppUIContext
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
CmsAppViewLayout
The app ui context. Allows OpenCms workplace apps access to the surrounding UI.
-
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.ui.ButtonaddPublishButton(I_CmsUpdateListener<String> updateListener) Adds the publish button to the toolbar.voidaddToolbarButton(com.vaadin.ui.Component button) Adds a toolbar button.voidaddToolbarButtonRight(com.vaadin.ui.Component button) Adds a toolbar button to the right hand side.voidRemoves the app's toolbar buttons.voidenableDefaultToolbarButtons(boolean enabled) Enables or removes the default toolbar buttons.getAppId()Returns the app id.getAttribute(String key) Gets an attribute.voidHides the the toolbar.voidremoveToolbarButton(com.vaadin.ui.Component button) Removes the given button from the toolbar.voidsetAppContent(com.vaadin.ui.Component appContent) Sets the app content component.voidsetAppInfo(com.vaadin.ui.Component infoContent) Sets the app info component.voidsetAppTitle(String title) Sets the app title.voidsetAttribute(String key, Object value) Sets an attribute.voidsetMenuDialogContext(I_CmsDialogContext context) Sets the dialog context for context menu entries.voidshowInfoArea(boolean show) Sets the info grid visibility.voidShows the formerly hidden toolbar.voidUpdates the ui context on site or project changes.voidUpdates the displayed user info.
-
Method Details
-
addPublishButton
Adds the publish button to the toolbar.- Parameters:
updateListener- the update listener, called after publishing- Returns:
- the added button
-
addToolbarButton
Adds a toolbar button.- Parameters:
button- the button to add
-
addToolbarButtonRight
Adds a toolbar button to the right hand side.- Parameters:
button- the button to add
-
clearToolbarButtons
void clearToolbarButtons()Removes the app's toolbar buttons. -
enableDefaultToolbarButtons
Enables or removes the default toolbar buttons.These are the context menu and the quick launch drop down.
The default is
enabled = true.- Parameters:
enabled-trueto enable the buttons
-
getAppId
Returns the app id.- Returns:
- the app id
-
getAttribute
Gets an attribute.- Parameters:
key- the attribute key- Returns:
- the attribute value
-
hideToolbar
void hideToolbar()Hides the the toolbar. -
removeToolbarButton
Removes the given button from the toolbar.- Parameters:
button- the button to remove
-
setAppContent
Sets the app content component.- Parameters:
appContent- the app content
-
setAppInfo
Sets the app info component.- Parameters:
infoContent- the info component
-
setAppTitle
Sets the app title.- Parameters:
title- the app title
-
setAttribute
Sets an attribute.- Parameters:
key- the attribute keyvalue- the attribute value
-
setMenuDialogContext
Sets the dialog context for context menu entries.- Parameters:
context- the dialog context
-
showInfoArea
Sets the info grid visibility.- Parameters:
show-trueto show the info
-
showToolbar
void showToolbar()Shows the formerly hidden toolbar. -
updateOnChange
void updateOnChange()Updates the ui context on site or project changes. -
updateUserInfo
void updateUserInfo()Updates the displayed user info.
-