|
||||||||||
| 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.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.SimplePanel
com.google.gwt.user.client.ui.PopupPanel
com.google.gwt.user.client.ui.DecoratedPopupPanel
com.google.gwt.user.client.ui.DialogBox
public class DialogBox
A form of popup that has a caption area at the top and can be dragged by the
user. Unlike a PopupPanel, calls to PopupPanel.setWidth(String) and
PopupPanel.setHeight(String) will set the width and height of the dialog box
itself, even if a widget has not been added as yet.
DialogBox elements in
UiBinder templates can
have one widget child and one <g:caption> child. (Note the lower case
"c", meant to signal that the caption is not a runtime object, and so cannot
have a ui:field attribute.) The body of the
caption can be html.
For example:
<g:DialogBox autoHide="true" modal="true">
<g:caption><b>Caption text</b></g:caption>
<g:HTMLPanel>
Body text
<g:Button ui:field='cancelButton'>Cancel</g:Button>
<g:Button ui:field='okButton'>Okay</g:Button>
</g:HTMLPanel>
</g:DialogBox>
| Nested Class Summary | |
|---|---|
static interface |
DialogBox.Caption
Set of characteristic interfaces supported by the DialogBox caption
Note that this set might expand over time, so implement this interface at
your own risk. |
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.PopupPanel |
|---|
PopupPanel.PositionCallback |
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
DialogBox()
Creates an empty dialog box. |
|
DialogBox(boolean autoHide)
Creates an empty dialog box specifying its "auto-hide" property. |
|
DialogBox(boolean autoHide,
boolean modal)
Creates an empty dialog box specifying its "auto-hide" property. |
|
| Method Summary | |
|---|---|
DialogBox.Caption |
getCaption()
Provides access to the dialog's caption. |
java.lang.String |
getHTML()
Gets this object's contents as HTML. |
java.lang.String |
getText()
Gets this object's text. |
void |
hide()
Hides the popup and detaches it from the page. |
void |
onBrowserEvent(Event event)
Fired whenever a browser event is received. |
void |
onMouseDown(Widget sender,
int x,
int y)
Deprecated. Use beginDragging(com.google.gwt.event.dom.client.MouseDownEvent) and getCaption()
instead |
void |
onMouseEnter(Widget sender)
Deprecated. Use HasMouseOverHandlers.addMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler) instead |
void |
onMouseLeave(Widget sender)
Deprecated. Use HasMouseOutHandlers.addMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler) instead |
void |
onMouseMove(Widget sender,
int x,
int y)
Deprecated. Use continueDragging(com.google.gwt.event.dom.client.MouseMoveEvent) and getCaption() instead |
void |
onMouseUp(Widget sender,
int x,
int y)
Deprecated. Use endDragging(com.google.gwt.event.dom.client.MouseUpEvent) and getCaption() instead |
void |
setHTML(java.lang.String html)
Sets the html string inside the caption. |
void |
setText(java.lang.String text)
Sets the text inside the caption. |
void |
show()
Shows the popup and attach it to the page. |
| Methods inherited from class com.google.gwt.user.client.ui.DecoratedPopupPanel |
|---|
clear, getWidget, iterator, remove, setWidget |
| Methods inherited from class com.google.gwt.user.client.ui.SimplePanel |
|---|
add |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
fireEvent, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStylePrimaryName, isVisible, removeStyleDependentName, removeStyleName, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setVisible, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Constructor Detail |
|---|
public DialogBox()
SimplePanel.add(Widget).
public DialogBox(boolean autoHide)
SimplePanel.add(Widget).
autoHide - true if the dialog should be automatically
hidden when the user clicks outside of it
public DialogBox(boolean autoHide,
boolean modal)
SimplePanel.add(Widget).
autoHide - true if the dialog should be automatically
hidden when the user clicks outside of itmodal - true if keyboard and mouse events for widgets not
contained by the dialog should be ignored| Method Detail |
|---|
public final DialogBox.Caption getCaption()
public java.lang.String getHTML()
HasHTML
getHTML in interface HasHTMLpublic java.lang.String getText()
HasText
getText in interface HasTextpublic void hide()
PopupPanel
hide in class PopupPanelpublic void onBrowserEvent(Event event)
EventListener
onBrowserEvent in interface EventListeneronBrowserEvent in class Widgetevent - the event received
@Deprecated
public void onMouseDown(Widget sender,
int x,
int y)
beginDragging(com.google.gwt.event.dom.client.MouseDownEvent) and getCaption()
instead
MouseListener
onMouseDown in interface MouseListenersender - the widget sending the eventx - the x coordinate of the mousey - the y coordinate of the mouse@Deprecated public void onMouseEnter(Widget sender)
HasMouseOverHandlers.addMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler) instead
MouseListener
onMouseEnter in interface MouseListenersender - the widget sending the event@Deprecated public void onMouseLeave(Widget sender)
HasMouseOutHandlers.addMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler) instead
MouseListener
onMouseLeave in interface MouseListenersender - the widget sending the event
@Deprecated
public void onMouseMove(Widget sender,
int x,
int y)
continueDragging(com.google.gwt.event.dom.client.MouseMoveEvent) and getCaption() instead
MouseListener
onMouseMove in interface MouseListenersender - the widget sending the eventx - the x coordinate of the mousey - the y coordinate of the mouse
@Deprecated
public void onMouseUp(Widget sender,
int x,
int y)
endDragging(com.google.gwt.event.dom.client.MouseUpEvent) and getCaption() instead
MouseListener
onMouseUp in interface MouseListenersender - the widget sending the eventx - the x coordinate of the mousey - the y coordinate of the mousepublic void setHTML(java.lang.String html)
DecoratedPopupPanel.setWidget(Widget) to set the contents inside the
DialogBox.
setHTML in interface HasHTMLhtml - the object's new HTMLpublic void setText(java.lang.String text)
DecoratedPopupPanel.setWidget(Widget) to set the contents inside the
DialogBox.
setText in interface HasTexttext - the object's new textpublic void show()
PopupPanel
show in class PopupPanel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||