|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.smartgwt.client.widgets.BaseWidget
com.smartgwt.client.widgets.Canvas
com.smartgwt.client.widgets.layout.Layout
com.smartgwt.client.widgets.layout.VLayout
com.smartgwt.client.widgets.Window
com.smartgwt.client.widgets.Dialog
public class Dialog
Dialogs are a specialized version of Window
used for small windows such as
alerts, prompts, and confirmations. They can be modal or modeless (via the
isModal
property) and will contain various children by default
("titlebar", "resizer", etc).
NOTE: If you are building a custom component that will add components to the Window via
Window.addItem(com.google.gwt.user.client.ui.Widget)
, in most cases it makes sense
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.smartgwt.client.widgets.BaseWidget |
---|
config, configOnly, id, isElementSet |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
Dialog()
|
|
Dialog(com.google.gwt.core.client.JavaScriptObject jsObj)
|
Method Summary | |
---|---|
void |
applyClick()
Handle a click on the 'apply' button of this Dialog. |
void |
cancelClick()
Handle a click on the 'cancel' button of this Dialog. Default implementation is to return null and hide the Dialog. Override to do something else. |
void |
closeClick()
Handles a click on the close button of this window. |
protected com.google.gwt.core.client.JavaScriptObject |
create()
|
void |
doneClick()
Handle a click on the 'done' button of this Dialog. Default implementation is to hide the dialog then return true .
Override to do something else.
|
static Dialog |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
|
java.lang.Boolean |
getShowToolbar()
Whether to show a toolbar of buttons at the bottom of the Dialog. |
java.lang.String |
getStyleName()
Style of the Dialog background |
void |
noClick()
Handle a click on the 'no' button of this Dialog. Default implementation is to return false .
Override to do something else.
|
void |
okClick()
Handle a click on the 'ok' button of this Dialog. Default implementation is to call saveData() , hide the Dialog, then return
true . |
void |
saveData()
Method to save this Dialog's data. |
void |
setMessageStyle(java.lang.String messageStyle)
Style to apply to the message text shown in the center of the dialog |
void |
setShowToolbar(java.lang.Boolean showToolbar)
Whether to show a toolbar of buttons at the bottom of the Dialog. |
void |
setStyleName(java.lang.String styleName)
Style of the Dialog background |
void |
setToolbarButtons(Canvas... toolbarButtons)
Array of Buttons to show in the showToolbar , if shown. |
void |
yesClick()
Handle a click on the 'yes' button of this Dialog. Default implementation is to return true .
Override to do something else
|
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setPixelSize, setSize, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Constructor Detail |
---|
public Dialog()
public Dialog(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail |
---|
public static Dialog getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
protected com.google.gwt.core.client.JavaScriptObject create()
create
in class Window
public void setStyleName(java.lang.String styleName)
setStyleName
in class Canvas
styleName
- styleName Default value is "dialogBackground"public java.lang.String getStyleName()
getStyleName
in class Canvas
public void setShowToolbar(java.lang.Boolean showToolbar)
showToolbar
- showToolbar Default value is falsepublic java.lang.Boolean getShowToolbar()
public void saveData()
okClick()
,
applyClick()
.
No default implementation - override to perform some action if required.
public void closeClick()
public void cancelClick()
public void okClick()
saveData()
, hide the Dialog, then return
true
.
Override to do something else.
public void applyClick()
saveData()
, but NOT close the Dialog.
public void yesClick()
true
.
Override to do something else
public void noClick()
false
.
Override to do something else.
public void doneClick()
true
.
Override to do something else.
public void setToolbarButtons(Canvas... toolbarButtons)
showToolbar
, if shown.
The set of buttons to use is typically set by calling one of the shortcuts.
toolbarButtons
- the toolbart buttons
java.lang.IllegalStateException
- this property cannot be changed after the component has been renderedpublic void setMessageStyle(java.lang.String messageStyle) throws java.lang.IllegalStateException
Note : This is an advanced setting
messageStyle
- messageStyle Default value is "normal"
java.lang.IllegalStateException
- this property cannot be changed after the component has been created
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |