|
|||||||||
| 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.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.BoxComponent
com.extjs.gxt.ui.client.widget.Container<T>
com.extjs.gxt.ui.client.widget.ScrollContainer<Component>
com.extjs.gxt.ui.client.widget.LayoutContainer
com.extjs.gxt.ui.client.widget.ContentPanel
com.extjs.gxt.ui.client.widget.Window
com.extjs.gxt.ui.client.widget.Dialog
public class Dialog
A Window with specialized support for buttons. Defaults to a
dialog with an 'ok' button.
Dialog d = new Dialog();
d.setHeading("Exit Warning!");
d.addText("Do you wish to save before exiting?");
d.setBodyStyle("fontWeight:bold;padding:13px;");
d.setSize(300, 100);
d.setHideOnButtonClick(true);
d.setButtons(Dialog.YESNOCANCEL);
d.show();
The internal buttons can be retrieved from the button bar using their
respective ids ('ok', 'cancel', 'yes', 'no', 'cancel') or by index. The
method getButtonBar() creates the buttons, so any call before the
dialog is rendered will cause the buttons to be created based on the
setButtons(String) value.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.extjs.gxt.ui.client.widget.Window |
|---|
Window.CloseAction |
| 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 | |
|---|---|
static java.lang.String |
CANCEL
Button constant that displays a single CANCEL button. |
java.lang.String |
cancelText
The Cancel button text (defaults to 'Cancel'). |
java.lang.String |
closeText
The Close button text (defaults to 'Close'). |
static java.lang.String |
NO
Button constant for the itemId of a NO button. |
java.lang.String |
noText
The No button text (defaults to 'No'). |
static java.lang.String |
OK
Button constant that displays a single OK button. |
static java.lang.String |
OKCANCEL
Button constant that displays a OK and CANCEL button. |
java.lang.String |
okText
The OK button text (defaults to 'OK'); |
static java.lang.String |
YES
Button constant for the itemId of a YES button. |
static java.lang.String |
YESNO
Button constant that displays a YES and NO button. |
static java.lang.String |
YESNOCANCEL
Button constant that displays a YES, NO, and CANCEL button. |
java.lang.String |
yesText
The Yes button text (defaults to 'Yes'). |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
Dialog()
|
|
| Method Summary | |
|---|---|
ButtonBar |
getButtonBar()
Returns the panel's button bar. |
Button |
getButtonById(java.lang.String id)
Returns the button by id. |
Button |
getButtonPressed()
Returns the last pressed button. |
java.lang.String |
getButtons()
Returns the Dialog's button creation constant. |
boolean |
isHideOnButtonClick()
Returns true if the dialog will be hidden on any button click. |
void |
setButtons(java.lang.String buttons)
Sets the Dialog's button creation constant (defaults to OK). |
void |
setHideOnButtonClick(boolean hideOnButtonClick)
True to hide the dialog on any button click. |
| Methods inherited from class com.extjs.gxt.ui.client.widget.Window |
|---|
addWindowListener, alignTo, center, close, close, focus, getCloseAction, getConstrain, getContainer, getDraggable, getFocusWidget, getInitialWidth, getMinHeight, getMinWidth, getResizable, hide, hide, isAutoHide, isBlinkModal, isClosable, isDraggable, isMaximizable, isMinimizable, isModal, isOnEsc, isPlain, isResizable, maximize, minimize, removeWindowListener, restore, setActive, setAutoHide, setBlinkModal, setClosable, setCloseAction, setConstrain, setContainer, setDraggable, setFocusWidget, setInitialWidth, setMaximizable, setMinHeight, setMinimizable, setMinWidth, setModal, setOnEsc, setPagePosition, setPlain, setPosition, setResizable, show, toBack, toFront |
| Methods inherited from class com.extjs.gxt.ui.client.widget.LayoutContainer |
|---|
add, add, addText, findComponent, getLayout, getLayoutOnChange, insert, insert, isMonitorResize, isMonitorWindowResize, layout, remove, removeAll, setLayout, setLayoutData, setLayoutOnChange, setMonitorWindowResize |
| Methods inherited from class com.extjs.gxt.ui.client.widget.ScrollContainer |
|---|
addScrollListener, getHScrollPosition, getScrollMode, getVScrollPosition, removeScrollListener, scrollIntoView, setHScrollPosition, setScrollMode, setVScrollPosition |
| Methods inherited from class com.extjs.gxt.ui.client.widget.Container |
|---|
disable, enable, findItem, getItem, getItemByItemId, getItemCount, getItems, getWidget, indexOf, iterator, scrollIntoView |
| Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
|---|
getBounds, getHeight, getHeight, getPosition, getShadow, getSize, getWidth, getWidth, isAutoHeight, isAutoWidth, isDeferHeight, isShim, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPixelSize, setShadow, setShim, setSize, setSize, setWidth, setWidth |
| Methods inherited from class com.extjs.gxt.ui.client.widget.Component |
|---|
addListener, addPlugin, addStyleName, addWidgetListener, disableEvents, disableTextSelection, el, enableEvents, fireEvent, fireEvent, fireEvent, fly, getBaseStyle, getBorders, getData, getData, getElement, getId, getItemId, getModel, getState, getToolTip, hideToolTip, isDisabledEvents, isEnabled, isRendered, isVisible, onBrowserEvent, recalculate, removeAllListeners, removeFromParent, removeListener, removeStyleName, removeWidgetListener, render, render, saveState, setBorders, setData, setData, setElement, setEnabled, setEnableState, setId, setIntStyleAttribute, setItemId, setStyleAttribute, setStyleName, setTitle, setToolTip, setToolTip, setVisible, sinkEvents, toString |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
getParent, isAttached |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String OK
public static final java.lang.String CANCEL
public static final java.lang.String OKCANCEL
public static final java.lang.String YESNO
public static final java.lang.String NO
public static final java.lang.String YES
public static final java.lang.String YESNOCANCEL
public java.lang.String okText
public java.lang.String closeText
public java.lang.String cancelText
public java.lang.String yesText
public java.lang.String noText
| Constructor Detail |
|---|
public Dialog()
| Method Detail |
|---|
public ButtonBar getButtonBar()
ContentPanel
getButtonBar in class ContentPanelpublic Button getButtonById(java.lang.String id)
id - the button id
public Button getButtonPressed()
null if no button pressedpublic java.lang.String getButtons()
public boolean isHideOnButtonClick()
public void setButtons(java.lang.String buttons)
Dialog.OK Dialog.CANCEL Dialog.OKCANCEL Dialog.YESNO Dialog.YESNOCANCEL
public void setHideOnButtonClick(boolean hideOnButtonClick)
hideOnButtonClick - true to hide
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||