Package org.opencms.ui.components
Class CmsBasicDialog
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.ui.AbstractComponent
-
- com.vaadin.ui.AbstractComponentContainer
-
- com.vaadin.ui.AbstractLayout
-
- com.vaadin.ui.AbstractOrderedLayout
-
- com.vaadin.ui.VerticalLayout
-
- org.opencms.ui.components.CmsBasicDialog
-
- All Implemented Interfaces:
com.vaadin.event.ContextClickEvent.ContextClickNotifier,com.vaadin.event.LayoutEvents.LayoutClickNotifier,com.vaadin.event.MethodEventSource,com.vaadin.server.ClientConnector,com.vaadin.server.Sizeable,com.vaadin.shared.Connector,com.vaadin.ui.Component,com.vaadin.ui.ComponentContainer,com.vaadin.ui.HasComponents,com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier,com.vaadin.ui.Layout,com.vaadin.ui.Layout.AlignmentHandler,com.vaadin.ui.Layout.MarginHandler,com.vaadin.ui.Layout.SpacingHandler,java.io.Serializable,java.lang.Iterable<com.vaadin.ui.Component>
- Direct Known Subclasses:
A_CmsEditUserGroupRoleDialog,A_CmsImportExportUserDialog,A_CmsSelectResourceTypeDialog,CmsAddExportResourcesDialog,CmsAdditionalInfosDialog,CmsAddPropertyDefinitionDialog,CmsAvailabilityDialog,CmsCategorySelectDialog,CmsChangePasswordDialog,CmsConfirmationDialog,CmsConfirmSimpleFlushDialog,CmsCopyMoveDialog,CmsCopyPageDialog,CmsCopyToProjectDialog,CmsDataViewDialog,CmsDbSynchDialog,CmsDeleteDialog,CmsDeleteMultiplePrincipalDialog,CmsDeleteOUDialog,CmsDeleteSiteDialog,CmsEditFavoriteDialog,CmsEditLoginView,CmsEditModuleForm,CmsEditProjectForm,CmsEditResourceTypeDialog,CmsEditSiteForm,CmsErrorDialog,CmsExportThreadDialog,CmsFavoriteDialog,CmsFlexCacheCleanDialog,CmsFlushButtonHolderDialog,CmsGalleryOptimizeDialog,CmsGeneratePasswordDialog,CmsGitActionResultPanel,CmsGlobalForm,CmsGroupEditDialog,CmsHistoryDialog,CmsImageCacheCleanDialog,CmsImportTabForm,CmsJobEditView,CmsKillSessionDialog,CmsLockedResourcesList,CmsLogDownloadDialog,CmsLogFileViewSettings,CmsMacroResolverDialog,CmsModuleExportDialog,CmsModuleInfoDialog,CmsMoveResourceTypeDialog,CmsMoveUserToOU,CmsNewElementDialog,CmsNewResourceTypeDialog,CmsOptionDialog,CmsOUEditDialog,CmsPermissionDialog,CmsPrincipalSelectDialog,CmsProjectSelectDialog,CmsPropertyDeleteDialog,CmsPublishScheduledDialog,CmsReindexDialog,CmsReportDialog,CmsResourceListDialog,CmsResourceSelectDialogContents,CmsRestoreDeletedDialog,CmsSecondFactorDialog,CmsSecondFactorSetupDialog,CmsSecureExportDialog,CmsSendBroadcastDialog,CmsShellScriptReportDialog,CmsShowReportDialog,CmsShowResourcesDialog,CmsSiteSelectDialog,CmsSiteSelectDialog,CmsSourceDialog,CmsSqlConsoleResultsForm,CmsTemplateMapperDialog,CmsTouchDialog,CmsUndeleteDialog,CmsUndoDialog,CmsUnlinkDialog,CmsUserDataDialog,CmsUserEditDialog,CmsUserInfoDialog,CmsVariationsDialog,CmsWebServerConfigForm
public class CmsBasicDialog extends com.vaadin.ui.VerticalLayout
Basic dialog class with a content panel and button bar.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCmsBasicDialog.DialogWidthThe available window widths.-
Nested 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.DetachListener
-
Nested 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.Listener
-
Nested 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.ComponentDetachListener
-
-
Constructor Summary
Constructors Constructor Description CmsBasicDialog()Creates new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddButton(com.vaadin.ui.Component button)Adds a button to the button bar.voidaddButton(com.vaadin.ui.Component button, boolean right)Adds a button to the button bar.com.vaadin.ui.ButtoncreateButtonCancel()Creates an 'Cancel' button.com.vaadin.ui.ButtoncreateButtonClose()Creates an 'Cancel' button.com.vaadin.ui.ButtoncreateButtonOK()Creates an 'OK' button.com.vaadin.ui.PanelcreateResourceListPanel(java.lang.String caption, java.util.List<CmsResource> resources)Creates a resource list panel.com.vaadin.ui.PanelcreateResourceListPanelDirectly(java.lang.String caption, java.util.List<CmsResourceInfo> resourceInfo)Creates a resource list panel.voiddisplayResourceInfo(java.util.List<CmsResource> resources)For a given list of resources, displays the resource info panels.voiddisplayResourceInfo(java.util.List<CmsResource> resources, java.lang.String messageKey)For a given list of resources, displays the resource info panels with panel messages.voiddisplayResourceInfo(CmsResource resource)For a given resource, display the resource info panel.voiddisplayResourceInfoDirectly(java.util.List<CmsResourceInfo> resourceInfos)Displays the resource info panel.protected voidenableMaxHeight()Adds the max height extension to the dialog panel.java.util.List<CmsResource>getInfoResources()Gets the resources for which the resource info boxes should be displayed.voidinitActionHandler(com.vaadin.ui.Window window)Initializes action handler.static com.vaadin.ui.WindowprepareWindow()Initializes the dialog window.static com.vaadin.ui.WindowprepareWindow(CmsBasicDialog.DialogWidth width)Initializes the dialog window.voidreadDesign(org.jsoup.nodes.Element design, com.vaadin.ui.declarative.DesignContext designContext)voidsetAbove(com.vaadin.ui.Component aboveContent)Sets the content to be displayed above the main content.voidsetActionHandler(com.vaadin.event.Action.Handler actionHandler)Sets the shortcut action handler.voidsetBelow(com.vaadin.ui.Component belowContent)Sets the content to be displayed below the main content.voidsetContent(com.vaadin.ui.Component content)Sets the content.voidsetContentMinHeight(int height)Sets the height of the content to a given min Height or 100%.voidsetContentVisibility(boolean visible)Sets the visibility of the content panel.voidsetWindowMinFullHeight(int minHeight)Sets the window which contains this dialog to full height with a given minimal height in pixel.-
Methods inherited from class com.vaadin.ui.VerticalLayout
addComponentsAndExpand, getState, getState
-
Methods inherited from class com.vaadin.ui.AbstractOrderedLayout
addComponent, addComponent, addComponentAsFirst, addLayoutClickListener, getComponent, getComponentAlignment, getComponentCount, getComponentIndex, getCustomAttributes, getDefaultComponentAlignment, getExpandRatio, getMargin, isSpacing, iterator, removeComponent, removeLayoutClickListener, replaceComponent, setComponentAlignment, setDefaultComponentAlignment, setExpandRatio, setMargin, setMargin, setSpacing, writeDesign
-
Methods inherited from class com.vaadin.ui.AbstractComponentContainer
addComponentAttachListener, addComponentDetachListener, addComponents, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, setHeight, setWidth
-
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, 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, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthFull, setWidthUndefined
-
Methods 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, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.ui.Component
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
-
Methods inherited from interface com.vaadin.ui.ComponentContainer
addComponents, getComponentIterator, moveComponentsFrom, removeAllComponents
-
-
-
-
Constructor Detail
-
CmsBasicDialog
public CmsBasicDialog()
Creates new instance.
-
-
Method Detail
-
prepareWindow
public static com.vaadin.ui.Window prepareWindow()
Initializes the dialog window.- Returns:
- the window to be used by dialogs
-
prepareWindow
public static com.vaadin.ui.Window prepareWindow(CmsBasicDialog.DialogWidth width)
Initializes the dialog window.- Parameters:
width- the dialog width- Returns:
- the window to be used by dialogs
-
addButton
public void addButton(com.vaadin.ui.Component button)
Adds a button to the button bar.- Parameters:
button- the button to add
-
addButton
public void addButton(com.vaadin.ui.Component button, boolean right)
Adds a button to the button bar.- Parameters:
button- the button to addright- to align the button right
-
createButtonCancel
public com.vaadin.ui.Button createButtonCancel()
Creates an 'Cancel' button.- Returns:
- the button
-
createButtonClose
public com.vaadin.ui.Button createButtonClose()
Creates an 'Cancel' button.- Returns:
- the button
-
createButtonOK
public com.vaadin.ui.Button createButtonOK()
Creates an 'OK' button.- Returns:
- the button
-
createResourceListPanel
public com.vaadin.ui.Panel createResourceListPanel(java.lang.String caption, java.util.List<CmsResource> resources)
Creates a resource list panel.- Parameters:
caption- the caption to useresources- the resources- Returns:
- the panel
-
createResourceListPanelDirectly
public com.vaadin.ui.Panel createResourceListPanelDirectly(java.lang.String caption, java.util.List<CmsResourceInfo> resourceInfo)
Creates a resource list panel.- Parameters:
caption- the caption to useresourceInfo- the resource-infos- Returns:
- the panel
-
displayResourceInfo
public void displayResourceInfo(CmsResource resource)
For a given resource, display the resource info panel.- Parameters:
resource- the resource
-
displayResourceInfo
public void displayResourceInfo(java.util.List<CmsResource> resources)
For a given list of resources, displays the resource info panels.- Parameters:
resources- the resources
-
displayResourceInfo
public void displayResourceInfo(java.util.List<CmsResource> resources, java.lang.String messageKey)
For a given list of resources, displays the resource info panels with panel messages.- Parameters:
resources- to show info formessageKey- of the panel
-
displayResourceInfoDirectly
public void displayResourceInfoDirectly(java.util.List<CmsResourceInfo> resourceInfos)
Displays the resource info panel.- Parameters:
resourceInfos- to display
-
getInfoResources
public java.util.List<CmsResource> getInfoResources()
Gets the resources for which the resource info boxes should be displayed.- Returns:
- the resource info resources
-
initActionHandler
public void initActionHandler(com.vaadin.ui.Window window)
Initializes action handler.- Parameters:
window- the parent window
-
readDesign
public void readDesign(org.jsoup.nodes.Element design, com.vaadin.ui.declarative.DesignContext designContext)
- Specified by:
readDesignin interfacecom.vaadin.ui.Component- Overrides:
readDesignin classcom.vaadin.ui.AbstractOrderedLayout- See Also:
AbstractOrderedLayout.readDesign(org.jsoup.nodes.Element, com.vaadin.ui.declarative.DesignContext)
-
setAbove
public void setAbove(com.vaadin.ui.Component aboveContent)
Sets the content to be displayed above the main content.- Parameters:
aboveContent- the above content
-
setActionHandler
public void setActionHandler(com.vaadin.event.Action.Handler actionHandler)
Sets the shortcut action handler.Set this before opening the window, so it will be initialized properly.
- Parameters:
actionHandler- the action handler
-
setBelow
public void setBelow(com.vaadin.ui.Component belowContent)
Sets the content to be displayed below the main content.- Parameters:
belowContent- the below content
-
setContent
public void setContent(com.vaadin.ui.Component content)
Sets the content.- Parameters:
content- the content widget
-
setContentMinHeight
public void setContentMinHeight(int height)
Sets the height of the content to a given min Height or 100%.- Parameters:
height- minimal height.
-
setContentVisibility
public void setContentVisibility(boolean visible)
Sets the visibility of the content panel.- Parameters:
visible- visibility of the content.
-
setWindowMinFullHeight
public void setWindowMinFullHeight(int minHeight)
Sets the window which contains this dialog to full height with a given minimal height in pixel.- Parameters:
minHeight- minimal height in pixel
-
enableMaxHeight
protected void enableMaxHeight()
Adds the max height extension to the dialog panel.
-
-