Package org.opencms.gwt.client.ui
Class CmsFrameDialog
java.lang.Object
org.opencms.gwt.client.ui.CmsFrameDialog
Frame dialog utility class.
Use to render the dialog content within an iFrame on top of a regular CmsPopup.
May also be used to wrap the popup if no iFrame is needed.
Provides function to show an iFrame dialog.
- Since:
- 8.5
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the close function.static final intThe dialog height.static final intThe dialog width.static final StringThe name of the enable dialog close function.static final StringThe name of the dialog height function.static final StringThe name of the IFrame used for displaying the upload hook page.static final StringThe name of the dialog title function.static final StringThe name of the dialog width function. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddButton(com.google.gwt.user.client.ui.Widget button) Adds a new button to the button bar.voidaddButton(com.google.gwt.user.client.ui.Widget button, int index) Adds a new button to the button bar at the specified index position.protected voidAdjusts the content panel size according to the button panel height.voidEnables the dialog close button on the popup.static booleanReturns if this dialog has a parent frame.voidhide()Hides the dialog.booleanReturns if the popup is showing and the content is rendered.voidremoveButton(com.google.gwt.user.client.ui.Widget button) Removes the given button from the button bar.protected static voidRemoves exported functions from the window context.voidsetContent(com.google.gwt.user.client.ui.Widget content) Sets the content widget.voidsetHeight(int height) Sets the popup height.voidSets the dialog title.voidsetWidth(int width) Sets the popup width.voidshow()Shows the dialog.static CmsPopupshowFrameDialog(String title, String dialogUri, Map<String, String> parameters, com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel> closeHandler) Shows an iFrame dialog popup.
-
Field Details
-
CLOSE_FUNCTION
The name of the close function.- See Also:
-
DIALOG_HEIGHT
The dialog height.- See Also:
-
DIALOG_WIDTH
The dialog width.- See Also:
-
ENABLE_CLOSE_FUNCTION
The name of the enable dialog close function.- See Also:
-
HEIGHT_FUNCTION
The name of the dialog height function.- See Also:
-
IFRAME_NAME
The name of the IFrame used for displaying the upload hook page.- See Also:
-
TITLE_FUNCTION
The name of the dialog title function.- See Also:
-
WIDTH_FUNCTION
The name of the dialog width function.- See Also:
-
-
Constructor Details
-
CmsFrameDialog
public CmsFrameDialog()Constructor.
-
-
Method Details
-
hasParentFrame
Returns if this dialog has a parent frame.- Returns:
trueif the parent frame is available
-
removeExportedFunctions
Removes exported functions from the window context. -
addButton
Adds a new button to the button bar.- Parameters:
button- the button to add
-
addButton
Adds a new button to the button bar at the specified index position.- Parameters:
button- the button to addindex- the index position
-
enableDialogClose
Enables the dialog close button on the popup. -
hide
Hides the dialog. -
isShowing
Returns if the popup is showing and the content is rendered.- Returns:
trueif the popup and content are showing
-
removeButton
Removes the given button from the button bar.- Parameters:
button- the button to remove
-
setContent
Sets the content widget.- Parameters:
content- the content widget
-
setHeight
Sets the popup height.- Parameters:
height- the height
-
setTitle
Sets the dialog title.- Parameters:
title- the title
-
setWidth
Sets the popup width.- Parameters:
width- the width
-
show
Shows the dialog. -
adjustContentSize
Adjusts the content panel size according to the button panel height.
-