|
||||||||||
| 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.DialogBox
A form of popup that has a caption area at the top and can be dragged by the user.
public class DialogBoxExample implements EntryPoint, ClickListener {
private static class MyDialog extends DialogBox {
public MyDialog() {
// Set the dialog box's caption.
setText("My First Dialog");
// DialogBox is a SimplePanel, so you have to set it's widget property to
// whatever you want its contents to be.
setWidget(new Label("Click outside of this popup to close it"));
}
}
public void onModuleLoad() {
Button b = new Button("Click me");
b.addClickListener(this);
RootPanel.get().add(b);
}
public void onClick(Widget sender) {
// Instantiate the dialog box and show it.
new MyDialog().show();
}
}
| Constructor Summary | |
DialogBox()
Creates an empty dialog box. |
|
| Method Summary | |
java.lang.String |
getHTML()
Gets this object's contents as HTML. |
java.lang.String |
getText()
Gets this object's text. |
void |
onMouseDown(Widget sender,
int x,
int y)
Fired when the user depresses the mouse button over a widget. |
void |
onMouseEnter(Widget sender)
Fired when the mouse enters a widget's area. |
void |
onMouseLeave(Widget sender)
Fired when the mouse leaves a widget's area. |
void |
onMouseMove(Widget sender,
int x,
int y)
Fired when the user moves the mouse over a widget. |
void |
onMouseUp(Widget sender,
int x,
int y)
Fired when the user releases the mouse button over a widget. |
boolean |
remove(Widget w)
Removes a child widget. |
void |
setHTML(java.lang.String html)
Sets this object's contents via HTML. |
void |
setText(java.lang.String text)
Sets this object's text. |
void |
setWidget(Widget w)
Sets this panel's widget. |
| Methods inherited from class com.google.gwt.user.client.ui.PopupPanel |
addPopupListener, getPopupLeft, getPopupTop, hide, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, removePopupListener, setPopupPosition, show |
| Methods inherited from class com.google.gwt.user.client.ui.SimplePanel |
add, getContainerElement, getWidget, iterator |
| Methods inherited from class com.google.gwt.user.client.ui.Panel |
adopt, clear, disown, onAttach, onDetach |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
getParent, isAttached, onBrowserEvent, onLoad, removeFromParent |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getTitle, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DialogBox()
SimplePanel.add(com.google.gwt.user.client.ui.Widget).
| Method Detail |
public java.lang.String getHTML()
HasHTML
getHTML in interface HasHTMLpublic java.lang.String getText()
HasText
getText in interface HasText
public void onMouseDown(Widget sender,
int x,
int y)
MouseListener
onMouseDown in interface MouseListenersender - the widget sending the eventx - the x coordinate of the mousey - the y coordinate of the mousepublic void onMouseEnter(Widget sender)
MouseListener
onMouseEnter in interface MouseListenersender - the widget sending the eventpublic void onMouseLeave(Widget sender)
MouseListener
onMouseLeave in interface MouseListenersender - the widget sending the event
public void onMouseMove(Widget sender,
int x,
int y)
MouseListener
onMouseMove in interface MouseListenersender - the widget sending the eventx - the x coordinate of the mousey - the y coordinate of the mouse
public void onMouseUp(Widget sender,
int x,
int y)
MouseListener
onMouseUp in interface MouseListenersender - the widget sending the eventx - the x coordinate of the mousey - the y coordinate of the mousepublic boolean remove(Widget w)
HasWidgets
remove in interface HasWidgetsremove in class PopupPanelpublic void setHTML(java.lang.String html)
HasHTMLHasText.setText(java.lang.String) whenever possible.
setHTML in interface HasHTMLhtml - the object's new HTMLpublic void setText(java.lang.String text)
HasText
setText in interface HasTexttext - the object's new textpublic void setWidget(Widget w)
SimplePanel
setWidget in class SimplePanelw - the panel's new widget (null will clear the panel)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||