Package org.opencms.ui
Class A_CmsUI
java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractSingleComponentContainer
com.vaadin.ui.UI
org.opencms.ui.A_CmsUI
- All Implemented Interfaces:
com.vaadin.event.Action.Container,com.vaadin.event.Action.Notifier,com.vaadin.event.ConnectorEventListener,com.vaadin.event.ContextClickEvent.ContextClickNotifier,com.vaadin.event.MethodEventSource,com.vaadin.event.SerializableEventListener,com.vaadin.event.UIEvents.PollNotifier,com.vaadin.server.ClientConnector,com.vaadin.server.Sizeable,com.vaadin.server.VariableOwner,com.vaadin.shared.Connector,com.vaadin.ui.Component,com.vaadin.ui.Component.Focusable,com.vaadin.ui.HasComponents,com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier,com.vaadin.ui.LegacyComponent,com.vaadin.ui.SingleComponentContainer,Serializable,Iterable<com.vaadin.ui.Component>,EventListener
- Direct Known Subclasses:
CmsAppWorkplaceUi,CmsEmbeddedDialogsUI,CmsErrorUI,CmsLoginUI,CmsSitemapUI
Abstract UI class providing access to the OpenCms context.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.ui.UI
com.vaadin.ui.UI.WindowOrderUpdateEvent, com.vaadin.ui.UI.WindowOrderUpdateListenerNested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListenerNested classes/interfaces inherited from interface com.vaadin.ui.Component
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.ListenerNested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListenerNested classes/interfaces inherited from interface com.vaadin.server.Sizeable
com.vaadin.server.Sizeable.Unit -
Field Summary
FieldsFields inherited from class com.vaadin.ui.UI
actionManagerFields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXTFields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeProject(CmsProject project) Changes to the given project.voidchangeSite(String siteRoot) Changes to the given site.voidCloses all opened dialog windows.static A_CmsUIget()Returns the current UI.getAttribute(String key) Returns the requested UI attribute.static CmsObjectReturns the current cms context.Gets the display type from the time when the UI was initialized.javax.servlet.http.HttpSessionReturns the HTTP session.Returns the last used offline project.Gets the request parameters with which the application was loaded.Returns the workplace settings.protected voidinit(com.vaadin.server.VaadinRequest request) voidopenPageOrWarn(String link, String target) Tries to open a new browser window, and shows a warning if opening the window fails (usually because of popup blockers).voidopenPageOrWarn(String link, String target, String warning) Tries to open a new browser window, and shows a warning if opening the window fails (usually because of popup blockers).voidreload()Reloads the current UI.voidsetAttribute(String key, Serializable value) Sets an UI attribute.voidsetContentToDialog(String caption, com.vaadin.ui.Component component) Replaces the ui content with a single dialog.voidsetContentToDialog(String caption, CmsBasicDialog dialog) Replaces the ui content with a single dialog.voidDisplays an error message in a centered box.Methods inherited from class com.vaadin.ui.UI
access, accessSynchronously, addAction, addActionHandler, addClickListener, addPollListener, addWindow, addWindowOrderUpdateListener, attach, changeVariables, close, detach, doInit, doRefresh, focus, getActionManager, getActiveDragSource, getComponentCount, getConnectorTracker, getCurrent, getEmbedId, getLastHeartbeatTimestamp, getLastProcessedClientToServerId, getLoadingIndicatorConfiguration, getLocaleService, getNavigator, getNotificationConfiguration, getOverlayContainerLabel, getPage, getPollInterval, getPushConfiguration, getPushConnection, getReconnectDialogConfiguration, getScrollLeft, getScrollTop, getSession, getState, getState, getStateType, getTabIndex, getTheme, getTooltipConfiguration, getUI, getUIId, getUiPathInfo, getUiRootPath, getWindows, isClosing, isConnectorEnabled, isMobileHtml5DndEnabled, isResizeLazy, isUsingThoroughSizeCheck, iterator, paintContent, push, refresh, removeAction, removeActionHandler, removeClickListener, removePollListener, removeWindow, scrollIntoView, setActiveDragSource, setCaption, setContent, setCurrent, setFocusedComponent, setLastHeartbeatTimestamp, setLastProcessedClientToServerId, setMobileHtml5DndEnabled, setNavigator, setOverlayContainerLabel, setPollInterval, setPushConnection, setResizeLazy, setScrollLeft, setScrollTop, setSession, setTabIndex, setTheme, setUsingThoroughSizeCheck, showNotification, showNotification, showNotification, showNotification, showNotification, showNotificationMethods inherited from class com.vaadin.ui.AbstractSingleComponentContainer
addComponentAttachListener, addComponentDetachListener, fireComponentAttachEvent, fireComponentDetachEvent, getContent, readDesign, readDesignChildren, removeComponentAttachListener, removeComponentDetachListener, removeFromParent, setHeight, setWidth, writeDesignMethods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, beforeClientResponse, findAncestor, fireComponentErrorEvent, fireComponentEvent, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthFull, setWidthUndefinedMethods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, encodeState, getErrorHandler, getExtensions, getRpcManager, handleConnectorRequest, isAttached, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlerMethods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, addStyleNames, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible, writeDesignMethods inherited from interface com.vaadin.shared.Connector
getConnectorIdMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface com.vaadin.ui.LegacyComponent
markAsDirtyMethods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefinedMethods inherited from interface com.vaadin.server.VariableOwner
isEnabled
-
Field Details
-
LAST_OFFLINE_PROJECT
The last offline project attribute key.- See Also:
-
-
Constructor Details
-
A_CmsUI
public A_CmsUI()Constructor.
-
-
Method Details
-
get
Returns the current UI.- Returns:
- the current UI
-
getCmsObject
Returns the current cms context.- Returns:
- the current cms context
-
changeProject
Changes to the given project. Will update session and workplace settings.- Parameters:
project- the project to change to
-
changeSite
Changes to the given site. Will update session and workplace settings.- Parameters:
siteRoot- the site to change to
-
closeWindows
Closes all opened dialog windows. -
getAttribute
Returns the requested UI attribute.- Parameters:
key- the attribute key- Returns:
- the attribute
-
getDisplayType
Gets the display type from the time when the UI was initialized.- Returns:
- the display type
-
getHttpSession
Returns the HTTP session.- Returns:
- the HTTP session
-
getLastOfflineProject
Returns the last used offline project.- Returns:
- the last used offline project
-
getParameters
Gets the request parameters with which the application was loaded.- Returns:
- the request parameters
-
getWorkplaceSettings
Returns the workplace settings.- Returns:
- the workplace settings
-
openPageOrWarn
Tries to open a new browser window, and shows a warning if opening the window fails (usually because of popup blockers).- Parameters:
link- the URL to open in the new windowtarget- the target window name
-
openPageOrWarn
Tries to open a new browser window, and shows a warning if opening the window fails (usually because of popup blockers).- Parameters:
link- the URL to open in the new windowtarget- the target window namewarning- the warning to show if opening the window fails
-
reload
Reloads the current UI. -
setAttribute
Sets an UI attribute.- Parameters:
key- the attribute keyvalue- the attribute value
-
setContentToDialog
Replaces the ui content with a single dialog.- Parameters:
caption- the captiondialog- the dialog content
-
setContentToDialog
Replaces the ui content with a single dialog.TODO: In the future this should only handle window creation, refactor dialog contents to CmsBasicDialog
- Parameters:
caption- the captioncomponent- the dialog content
-
setError
Displays an error message in a centered box.- Parameters:
error- the error message to display
-
init
- Specified by:
initin classcom.vaadin.ui.UI- See Also:
-