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.Button
addPublishButton
(I_CmsUpdateListener<String> updateListener) Adds the publish button to the toolbar.void
addToolbarButton
(com.vaadin.ui.Component button) Adds a toolbar button.void
addToolbarButtonRight
(com.vaadin.ui.Component button) Adds a toolbar button to the right hand side.void
Removes the app's toolbar buttons.void
enableDefaultToolbarButtons
(boolean enabled) Enables or removes the default toolbar buttons.getAppId()
Returns the app id.getAttribute
(String key) Gets an attribute.void
Hides the the toolbar.void
removeToolbarButton
(com.vaadin.ui.Component button) Removes the given button from the toolbar.void
setAppContent
(com.vaadin.ui.Component appContent) Sets the app content component.void
setAppInfo
(com.vaadin.ui.Component infoContent) Sets the app info component.void
setAppTitle
(String title) Sets the app title.void
setAttribute
(String key, Object value) Sets an attribute.void
setMenuDialogContext
(I_CmsDialogContext context) Sets the dialog context for context menu entries.void
showInfoArea
(boolean show) Sets the info grid visibility.void
Shows the formerly hidden toolbar.void
Updates the ui context on site or project changes.void
Updates 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
-true
to 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
-true
to 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.
-