Package org.opencms.ui.apps
Interface I_CmsAppUIContext
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
CmsAppViewLayout
public interface I_CmsAppUIContext extends java.io.Serializable
The app ui context. Allows OpenCms workplace apps access to the surrounding UI.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.vaadin.ui.Button
addPublishButton(I_CmsUpdateListener<java.lang.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
clearToolbarButtons()
Removes the app's toolbar buttons.void
enableDefaultToolbarButtons(boolean enabled)
Enables or removes the default toolbar buttons.java.lang.String
getAppId()
Returns the app id.java.lang.Object
getAttribute(java.lang.String key)
Gets an attribute.void
hideToolbar()
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(java.lang.String title)
Sets the app title.void
setAttribute(java.lang.String key, java.lang.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
showToolbar()
Shows the formerly hidden toolbar.void
updateOnChange()
Updates the ui context on site or project changes.void
updateUserInfo()
Updates the displayed user info.
-
-
-
Method Detail
-
addPublishButton
com.vaadin.ui.Button addPublishButton(I_CmsUpdateListener<java.lang.String> updateListener)
Adds the publish button to the toolbar.- Parameters:
updateListener
- the update listener, called after publishing- Returns:
- the added button
-
addToolbarButton
void addToolbarButton(com.vaadin.ui.Component button)
Adds a toolbar button.- Parameters:
button
- the button to add
-
addToolbarButtonRight
void addToolbarButtonRight(com.vaadin.ui.Component button)
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
void enableDefaultToolbarButtons(boolean enabled)
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
java.lang.String getAppId()
Returns the app id.- Returns:
- the app id
-
getAttribute
java.lang.Object getAttribute(java.lang.String key)
Gets an attribute.- Parameters:
key
- the attribute key- Returns:
- the attribute value
-
hideToolbar
void hideToolbar()
Hides the the toolbar.
-
removeToolbarButton
void removeToolbarButton(com.vaadin.ui.Component button)
Removes the given button from the toolbar.- Parameters:
button
- the button to remove
-
setAppContent
void setAppContent(com.vaadin.ui.Component appContent)
Sets the app content component.- Parameters:
appContent
- the app content
-
setAppInfo
void setAppInfo(com.vaadin.ui.Component infoContent)
Sets the app info component.- Parameters:
infoContent
- the info component
-
setAppTitle
void setAppTitle(java.lang.String title)
Sets the app title.- Parameters:
title
- the app title
-
setAttribute
void setAttribute(java.lang.String key, java.lang.Object value)
Sets an attribute.- Parameters:
key
- the attribute keyvalue
- the attribute value
-
setMenuDialogContext
void setMenuDialogContext(I_CmsDialogContext context)
Sets the dialog context for context menu entries.- Parameters:
context
- the dialog context
-
showInfoArea
void showInfoArea(boolean show)
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.
-
-