com.google.gwt.user.client.ui
Class DialogBox

java.lang.Object
  extended bycom.google.gwt.user.client.ui.UIObject
      extended bycom.google.gwt.user.client.ui.Widget
          extended bycom.google.gwt.user.client.ui.Panel
              extended bycom.google.gwt.user.client.ui.SimplePanel
                  extended bycom.google.gwt.user.client.ui.PopupPanel
                      extended bycom.google.gwt.user.client.ui.DialogBox
All Implemented Interfaces:
EventListener, EventListener, EventPreview, HasHTML, HasText, HasWidgets, MouseListener, SourcesPopupEvents

public class DialogBox
extends PopupPanel
implements HasHTML, MouseListener

A form of popup that has a caption area at the top and can be dragged by the user.

CSS Style Rules

Example

code


Field Summary
 
Fields inherited from class java.lang.Object
typeId, typeName
 
Constructor Summary
DialogBox()
          Creates an empty dialog box.
 
Method Summary
 boolean add(Widget w)
          Adds a new child widget to the panel.
 String getHTML()
          Gets this object's contents as HTML.
 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 enters 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 widget from the panel.
 void setHTML(String html)
          Sets this object's contents via HTML.
 void setText(String text)
          Sets this object's text.
 
Methods inherited from class com.google.gwt.user.client.ui.PopupPanel
addPopupListener, hide, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, removePopupListener, setHeight, setPixelSize, setPopupPosition, setStyleName, setWidth, show
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
clear, getContainerElement, getWidget, getWidgetCount, getWidgetIndex, iterator, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
adopt, disown, onAttach, onDetach
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onBrowserEvent, onLoad
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, isVisible, isVisible, removeStyleName, setElement, setSize, setStyleName, setVisible, setVisible, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, finalize, hashCode
 

Constructor Detail

DialogBox

public DialogBox()
Creates an empty dialog box. It should not be shown until its child widget has been added using add(com.google.gwt.user.client.ui.Widget).

Method Detail

add

public boolean add(Widget w)
Description copied from class: Panel
Adds a new child widget to the panel.

Overrides:
add in class PopupPanel

getHTML

public String getHTML()
Description copied from interface: HasHTML
Gets this object's contents as HTML.

Specified by:
getHTML in interface HasHTML
Returns:
the object's HTML

getText

public String getText()
Description copied from interface: HasText
Gets this object's text.

Specified by:
getText in interface HasText
Returns:
the object's text

onMouseDown

public void onMouseDown(Widget sender,
                        int x,
                        int y)
Description copied from interface: MouseListener
Fired when the user depresses the mouse button over a widget.

Specified by:
onMouseDown in interface MouseListener
Parameters:
sender - the widget sending the event
x - the x coordinate of the mouse
y - the y coordinate of the mouse

onMouseEnter

public void onMouseEnter(Widget sender)
Description copied from interface: MouseListener
Fired when the mouse enters a widget's area.

Specified by:
onMouseEnter in interface MouseListener
Parameters:
sender - the widget sending the event

onMouseLeave

public void onMouseLeave(Widget sender)
Description copied from interface: MouseListener
Fired when the mouse enters a widget's area.

Specified by:
onMouseLeave in interface MouseListener
Parameters:
sender - the widget sending the event

onMouseMove

public void onMouseMove(Widget sender,
                        int x,
                        int y)
Description copied from interface: MouseListener
Fired when the user moves the mouse over a widget.

Specified by:
onMouseMove in interface MouseListener
Parameters:
sender - the widget sending the event
x - the x coordinate of the mouse
y - the y coordinate of the mouse

onMouseUp

public void onMouseUp(Widget sender,
                      int x,
                      int y)
Description copied from interface: MouseListener
Fired when the user releases the mouse button over a widget.

Specified by:
onMouseUp in interface MouseListener
Parameters:
sender - the widget sending the event
x - the x coordinate of the mouse
y - the y coordinate of the mouse

remove

public boolean remove(Widget w)
Description copied from class: Panel
Removes a widget from the panel.

Overrides:
remove in class SimplePanel

setHTML

public void setHTML(String html)
Description copied from interface: HasHTML
Sets this object's contents via HTML. Use care when setting an object's HTML; it is an easy way to expose script-based security problems. Consider using HasText.setText(java.lang.String) whenever possible.

Specified by:
setHTML in interface HasHTML
Parameters:
html - the object's new HTML

setText

public void setText(String text)
Description copied from interface: HasText
Sets this object's text.

Specified by:
setText in interface HasText


This javadoc distribution was not produced by Google. The official documentation is here.