Package org.opencms.gwt.client.ui
Class CmsFrameDialog
- java.lang.Object
-
- org.opencms.gwt.client.ui.CmsFrameDialog
-
public class CmsFrameDialog extends java.lang.Object
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
Fields Modifier and Type Field Description static java.lang.String
CLOSE_FUNCTION
The name of the close function.static int
DIALOG_HEIGHT
The dialog height.static int
DIALOG_WIDTH
The dialog width.static java.lang.String
ENABLE_CLOSE_FUNCTION
The name of the enable dialog close function.static java.lang.String
HEIGHT_FUNCTION
The name of the dialog height function.static java.lang.String
IFRAME_NAME
The name of the IFrame used for displaying the upload hook page.static java.lang.String
TITLE_FUNCTION
The name of the dialog title function.static java.lang.String
WIDTH_FUNCTION
The name of the dialog width function.
-
Constructor Summary
Constructors Constructor Description CmsFrameDialog()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addButton(com.google.gwt.user.client.ui.Widget button)
Adds a new button to the button bar.void
addButton(com.google.gwt.user.client.ui.Widget button, int index)
Adds a new button to the button bar at the specified index position.protected void
adjustContentSize()
Adjusts the content panel size according to the button panel height.void
enableDialogClose()
Enables the dialog close button on the popup.static boolean
hasParentFrame()
Returns if this dialog has a parent frame.void
hide()
Hides the dialog.boolean
isShowing()
Returns if the popup is showing and the content is rendered.void
removeButton(com.google.gwt.user.client.ui.Widget button)
Removes the given button from the button bar.protected static void
removeExportedFunctions()
Removes exported functions from the window context.void
setContent(com.google.gwt.user.client.ui.Widget content)
Sets the content widget.void
setHeight(int height)
Sets the popup height.void
setTitle(java.lang.String title)
Sets the dialog title.void
setWidth(int width)
Sets the popup width.void
show()
Shows the dialog.static CmsPopup
showFrameDialog(java.lang.String title, java.lang.String dialogUri, java.util.Map<java.lang.String,java.lang.String> parameters, com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel> closeHandler)
Shows an iFrame dialog popup.
-
-
-
Field Detail
-
CLOSE_FUNCTION
public static final java.lang.String CLOSE_FUNCTION
The name of the close function.- See Also:
- Constant Field Values
-
DIALOG_HEIGHT
public static final int DIALOG_HEIGHT
The dialog height.- See Also:
- Constant Field Values
-
DIALOG_WIDTH
public static final int DIALOG_WIDTH
The dialog width.- See Also:
- Constant Field Values
-
ENABLE_CLOSE_FUNCTION
public static final java.lang.String ENABLE_CLOSE_FUNCTION
The name of the enable dialog close function.- See Also:
- Constant Field Values
-
HEIGHT_FUNCTION
public static final java.lang.String HEIGHT_FUNCTION
The name of the dialog height function.- See Also:
- Constant Field Values
-
IFRAME_NAME
public static final java.lang.String IFRAME_NAME
The name of the IFrame used for displaying the upload hook page.- See Also:
- Constant Field Values
-
TITLE_FUNCTION
public static final java.lang.String TITLE_FUNCTION
The name of the dialog title function.- See Also:
- Constant Field Values
-
WIDTH_FUNCTION
public static final java.lang.String WIDTH_FUNCTION
The name of the dialog width function.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsFrameDialog
public CmsFrameDialog()
Constructor.
-
-
Method Detail
-
hasParentFrame
public static boolean hasParentFrame()
Returns if this dialog has a parent frame.- Returns:
true
if the parent frame is available
-
showFrameDialog
public static CmsPopup showFrameDialog(java.lang.String title, java.lang.String dialogUri, java.util.Map<java.lang.String,java.lang.String> parameters, com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel> closeHandler)
Shows an iFrame dialog popup.- Parameters:
title
- the dialog titledialogUri
- the dialog URIparameters
- the dialog post parameterscloseHandler
- the dialog close handler- Returns:
- the opened popup
-
removeExportedFunctions
protected static void removeExportedFunctions()
Removes exported functions from the window context.
-
addButton
public void addButton(com.google.gwt.user.client.ui.Widget button)
Adds a new button to the button bar.- Parameters:
button
- the button to add
-
addButton
public void addButton(com.google.gwt.user.client.ui.Widget button, int index)
Adds a new button to the button bar at the specified index position.- Parameters:
button
- the button to addindex
- the index position
-
enableDialogClose
public void enableDialogClose()
Enables the dialog close button on the popup.
-
hide
public void hide()
Hides the dialog.
-
isShowing
public boolean isShowing()
Returns if the popup is showing and the content is rendered.- Returns:
true
if the popup and content are showing
-
removeButton
public void removeButton(com.google.gwt.user.client.ui.Widget button)
Removes the given button from the button bar.- Parameters:
button
- the button to remove
-
setContent
public void setContent(com.google.gwt.user.client.ui.Widget content)
Sets the content widget.- Parameters:
content
- the content widget
-
setHeight
public void setHeight(int height)
Sets the popup height.- Parameters:
height
- the height
-
setTitle
public void setTitle(java.lang.String title)
Sets the dialog title.- Parameters:
title
- the title
-
setWidth
public void setWidth(int width)
Sets the popup width.- Parameters:
width
- the width
-
show
public void show()
Shows the dialog.
-
adjustContentSize
protected void adjustContentSize()
Adjusts the content panel size according to the button panel height.
-
-