|
|||||||||
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
ContentPanel.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.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'). |
static java.lang.String |
CLOSE
Button constant that displays a single CLOSE button. |
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.extjs.gxt.ui.client.widget.Window |
---|
ariaMoveResizeDistance, closeBtn, dragger, manager, removeFromParentOnHide, restoreBtn |
Fields inherited from class com.extjs.gxt.ui.client.widget.ContentPanel |
---|
bbarStyle, bodStyle, body, bwrap, bwrapStyle, collapseStyle, fbar, footerStyle, frame, head, headerStyle, headerTextStyle, tbarStyle |
Fields inherited from class com.extjs.gxt.ui.client.widget.Container |
---|
attachChildren, enableLayout, layoutExecuted, layoutNeeded, layoutOnAttach, layoutOnChange |
Fields inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustSize, cacheSizes, ensureVisibilityOnSizing, height, lastSize, layer, shim, width |
Fields inherited from class com.extjs.gxt.ui.client.widget.Component |
---|
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
Dialog()
|
Method Summary | |
---|---|
protected void |
createButtons()
Creates the buttons based on button creation constant |
Button |
getButtonById(java.lang.String string)
|
java.lang.String |
getButtons()
Returns the button's. |
boolean |
isHideOnButtonClick()
Returns true if the dialog will be hidden on any button click. |
protected void |
onButtonPressed(Button button)
Called after a button in the button bar is selected. |
void |
setButtons(java.lang.String buttons)
Sets the buttons to display (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.LayoutContainer |
---|
add, add, addText, findComponent, getLayout, getWindowResizeDelay, insert, insert, isLayoutOnChange, isMonitorWindowResize, layout, layout, onBlur, remove, removeAll, setLayout, setLayoutData, setLayoutOnChange, setMonitorWindowResize, setWindowResizeDelay |
Methods inherited from class com.extjs.gxt.ui.client.widget.ScrollContainer |
---|
addScrollListener, afterRender, getHScrollPosition, getScrollMode, getVScrollPosition, removeScrollListener, scrollIntoView, setHScrollPosition, setScrollMode, setVScrollPosition |
Methods inherited from class com.extjs.gxt.ui.client.widget.Container |
---|
add, adjustIndex, adopt, createContainerEvent, disable, doLayout, doLayout, enable, findItem, getItem, getItemByItemId, getItemCount, getItems, getWidget, indexOf, insert, isLayoutNeeded, iterator, onAfterLayout, onAttach, onBeforeLayoutExcecuted, onInsert, onLayoutExcecuted, onRemove, orphan, remove, removeAll, scrollIntoView, setLayoutNeeded, wrapWidget |
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustPosition, adjustSize, getBounds, getHeight, getHeight, getPosition, getPositionEl, getResizeEl, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, hideShadow, hideShim, hideUnders, isAutoHeight, isAutoWidth, isDeferHeight, isShim, onPosition, onShow, onUnload, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPixelSize, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize |
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, setLayoutData |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, 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 CLOSE
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 java.lang.String getButtons()
public Button getButtonById(java.lang.String string)
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 hideprotected void createButtons()
protected void onButtonPressed(Button button)
setHideOnButtonClick(boolean)
is true, hides the dialog
when any button is pressed.
button
- the button
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |