Class CmsFormDialog
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.SimplePanel
-
- com.google.gwt.user.client.ui.PopupPanel
-
- org.opencms.gwt.client.ui.CmsPopup
-
- org.opencms.gwt.client.ui.input.form.CmsFormDialog
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.logical.shared.HasCloseHandlers<com.google.gwt.user.client.ui.PopupPanel>
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.EventPreview
,com.google.gwt.user.client.ui.AcceptsOneWidget
,com.google.gwt.user.client.ui.HasAnimation
,com.google.gwt.user.client.ui.HasOneWidget
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.HasWidgets
,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
,com.google.gwt.user.client.ui.IsWidget
,com.google.gwt.user.client.ui.SourcesPopupEvents
,java.lang.Iterable<com.google.gwt.user.client.ui.Widget>
,I_CmsAutoHider
- Direct Known Subclasses:
CmsAttributesDialog
,CmsElementSettingsDialog
,CmsUserSettingsDialog
public class CmsFormDialog extends CmsPopup
A dialog containing a form.- Since:
- 8.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opencms.gwt.client.ui.CmsPopup
CmsPopup.HistoryHandler
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.PopupPanel
com.google.gwt.user.client.ui.PopupPanel.AnimationType, com.google.gwt.user.client.ui.PopupPanel.PositionCallback
-
-
Field Summary
Fields Modifier and Type Field Description protected CmsForm
m_form
The widget containing the form fields.protected I_CmsFormHandler
m_formHandler
The form handler for this dialog.static int
MAX_DIALOG_WIDTH
The maximum dialog width.static int
STANDARD_DIALOG_WIDTH
The dialog width.-
Fields inherited from class org.opencms.gwt.client.ui.CmsPopup
DEFAULT_WIDTH, m_closeCommand, m_notificationWidgetInstalled, m_windowWidth, WIDE_WIDTH
-
-
Constructor Summary
Constructors Constructor Description CmsFormDialog(java.lang.String title, CmsForm form)
Constructs a new form dialog with a given title.CmsFormDialog(java.lang.String title, CmsForm form, java.lang.Integer dialogWidthObj)
Constructs a new form dialog with a given title.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
center()
CmsForm
getForm()
Gets the form of this dialog.CmsPushButton
getOkButton()
Returns the 'OK' button.protected void
initContent()
Initializes the form content.protected void
onClickCancel()
Called when the cancel button is clicked.protected void
onClickOk()
The method which should be called when the user clicks on the OK button of the dialog.protected void
registerPreviewHandler()
Registers the 'Enter' and 'Esc' shortcut action handler.protected void
removePreviewHandler()
Removes the 'Enter' and 'Esc' shortcut action handler.void
setFormHandler(I_CmsFormHandler formHandler)
Sets the form handler for this form dialog.void
setOkButtonEnabled(boolean enabled)
Enables/disables the OK button.void
show()
-
Methods inherited from class org.opencms.gwt.client.ui.CmsPopup
add, add, addButton, addButton, addDialogClose, adjustIndex, beginDragging, catchNotifications, centerHorizontally, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, clear, continueDragging, createDialogNotificationWidget, doAttachChildren, doDetachChildren, endDragging, getAvailableHeight, getCaption, getChildren, getContainerElement, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, getWidth, hasCaption, hide, hide, insert, insert, insertFront, installNotificationWidget, iterator, onBrowserEvent, onDetach, onPreviewNativeEvent, remove, remove, removeAllButtons, removeButton, removePadding, setBackgroundColor, setCaption, setHeight, setHeight, setMainContent, setPixelSize, setPositionFixed, setSize, setSpecialBackgroundClass, setUseAnimation, setWidget, setWidth, setWidth, showArrow, wrapWithBorderPadding
-
Methods inherited from class com.google.gwt.user.client.ui.PopupPanel
addAutoHidePartner, addCloseHandler, addPopupListener, getAnimationType, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAnimationType, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setVisible, showRelativeTo
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onLoad, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opencms.gwt.client.ui.I_CmsAutoHider
addAutoHidePartner, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, removeAutoHidePartner, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled
-
-
-
-
Field Detail
-
MAX_DIALOG_WIDTH
public static final int MAX_DIALOG_WIDTH
The maximum dialog width.- See Also:
- Constant Field Values
-
STANDARD_DIALOG_WIDTH
public static final int STANDARD_DIALOG_WIDTH
The dialog width.- See Also:
- Constant Field Values
-
m_formHandler
protected I_CmsFormHandler m_formHandler
The form handler for this dialog.
-
-
Constructor Detail
-
CmsFormDialog
public CmsFormDialog(java.lang.String title, CmsForm form)
Constructs a new form dialog with a given title.- Parameters:
title
- the title of the form dialogform
- the form to use
-
CmsFormDialog
public CmsFormDialog(java.lang.String title, CmsForm form, java.lang.Integer dialogWidthObj)
Constructs a new form dialog with a given title.- Parameters:
title
- the title of the form dialogform
- the form to usedialogWidthObj
- the dialog width (if null, don't set any width; if negative, set default width)
-
-
Method Detail
-
center
public void center()
- Overrides:
center
in classCmsPopup
- See Also:
CmsPopup.center()
-
getOkButton
public CmsPushButton getOkButton()
Returns the 'OK' button.- Returns:
- the 'OK' button
-
setFormHandler
public void setFormHandler(I_CmsFormHandler formHandler)
Sets the form handler for this form dialog.- Parameters:
formHandler
- the new form handler
-
setOkButtonEnabled
public void setOkButtonEnabled(boolean enabled)
Enables/disables the OK button.- Parameters:
enabled
- if true, enables the OK button, else disables it
-
show
public void show()
- Overrides:
show
in classCmsPopup
- See Also:
CmsPopup.show()
-
initContent
protected void initContent()
Initializes the form content.
-
onClickCancel
protected void onClickCancel()
Called when the cancel button is clicked.
-
onClickOk
protected void onClickOk()
The method which should be called when the user clicks on the OK button of the dialog.
-
registerPreviewHandler
protected void registerPreviewHandler()
Registers the 'Enter' and 'Esc' shortcut action handler.
-
removePreviewHandler
protected void removePreviewHandler()
Removes the 'Enter' and 'Esc' shortcut action handler.
-
-