| java.lang.Object com.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
All known Subclasses: com.google.gwt.user.client.ui.DialogBox,
Inner Class :public interface PositionCallback | |
Constructor Summary | |
public | PopupPanel() Creates an empty popup panel. | public | PopupPanel(boolean autoHide) Creates an empty popup panel, specifying its "auto-hide" property. | public | PopupPanel(boolean autoHide, boolean modal) Creates an empty popup panel, specifying its "auto-hide" property. |
Method Summary | |
public void | addPopupListener(PopupListener listener) | public void | center() Centers the popup in the browser window and shows it. | protected Element | getContainerElement() | public int | getOffsetHeight() Gets the panel's offset height in pixels. | public int | getOffsetWidth() Gets the panel's offset width in pixels. | public int | getPopupLeft() Gets the popup's left position relative to the browser's client area. | public int | getPopupTop() Gets the popup's top position relative to the browser's client area. | protected Element | getStyleElement() | public String | getTitle() | public void | hide() Hides the popup. | protected void | onDetach() This method is called when a widget is detached from the browser's
document. | public boolean | onEventPreview(Event event) | public boolean | onKeyDownPreview(char key, int modifiers) Popups get an opportunity to preview keyboard events before they are passed
to a widget contained by the Popup.
Parameters: key - the key code of the depressed key Parameters: modifiers - keyboard modifiers, as specified inKeyboardListener. | public boolean | onKeyPressPreview(char key, int modifiers) Popups get an opportunity to preview keyboard events before they are passed
to a widget contained by the Popup.
Parameters: key - the unicode character pressed Parameters: modifiers - keyboard modifiers, as specified inKeyboardListener. | public boolean | onKeyUpPreview(char key, int modifiers) Popups get an opportunity to preview keyboard events before they are passed
to a widget contained by the Popup.
Parameters: key - the key code of the released key Parameters: modifiers - keyboard modifiers, as specified inKeyboardListener. | public void | removePopupListener(PopupListener listener) | public void | setHeight(String height) Sets the height of the panel's child widget. | public void | setPopupPosition(int left, int top) Sets the popup's position relative to the browser's client area. | public void | setPopupPositionAndShow(PositionCallback callback) Sets the popup's position using a
PositionCallback , and shows the
popup. | public void | setTitle(String title) | public void | setVisible(boolean visible) Sets whether this object is visible. | public void | setWidget(Widget w) | public void | setWidth(String width) Sets the width of the panel's child widget. | public void | show() Shows the popup. |
PopupPanel | public PopupPanel()(Code) | | Creates an empty popup panel. A child widget must be added to it before it
is shown.
|
PopupPanel | public PopupPanel(boolean autoHide)(Code) | | Creates an empty popup panel, specifying its "auto-hide" property.
Parameters: autoHide - true if the popup should be automaticallyhidden when the user clicks outside of it |
PopupPanel | public PopupPanel(boolean autoHide, boolean modal)(Code) | | Creates an empty popup panel, specifying its "auto-hide" property.
Parameters: autoHide - true if the popup should be automaticallyhidden when the user clicks outside of it Parameters: modal - true if keyboard or mouse events that do nottarget the PopupPanel or its children should be ignored |
center | public void center()(Code) | | Centers the popup in the browser window and shows it. If the popup was
already showing, then the popup is centered.
|
getOffsetHeight | public int getOffsetHeight()(Code) | | Gets the panel's offset height in pixels. Calls to
PopupPanel.setHeight(String) before the panel's child widget is set will not
influence the offset height.
the object's offset height |
getOffsetWidth | public int getOffsetWidth()(Code) | | Gets the panel's offset width in pixels. Calls to
PopupPanel.setWidth(String) before the panel's child widget is set will not influence the offset width.
the object's offset width |
getPopupLeft | public int getPopupLeft()(Code) | | Gets the popup's left position relative to the browser's client area.
the popup's left position |
getPopupTop | public int getPopupTop()(Code) | | Gets the popup's top position relative to the browser's client area.
the popup's top position |
hide | public void hide()(Code) | | Hides the popup. This has no effect if it is not currently visible.
|
onDetach | protected void onDetach()(Code) | | This method is called when a widget is detached from the browser's
document. To receive notification before the PopupPanel is removed from the
document, override the
Widget.onUnload method instead.
|
onEventPreview | public boolean onEventPreview(Event event)(Code) | | |
onKeyDownPreview | public boolean onKeyDownPreview(char key, int modifiers)(Code) | | Popups get an opportunity to preview keyboard events before they are passed
to a widget contained by the Popup.
Parameters: key - the key code of the depressed key Parameters: modifiers - keyboard modifiers, as specified inKeyboardListener. false to suppress the event |
onKeyPressPreview | public boolean onKeyPressPreview(char key, int modifiers)(Code) | | Popups get an opportunity to preview keyboard events before they are passed
to a widget contained by the Popup.
Parameters: key - the unicode character pressed Parameters: modifiers - keyboard modifiers, as specified inKeyboardListener. false to suppress the event |
onKeyUpPreview | public boolean onKeyUpPreview(char key, int modifiers)(Code) | | Popups get an opportunity to preview keyboard events before they are passed
to a widget contained by the Popup.
Parameters: key - the key code of the released key Parameters: modifiers - keyboard modifiers, as specified inKeyboardListener. false to suppress the event |
setHeight | public void setHeight(String height)(Code) | | Sets the height of the panel's child widget. If the panel's child widget
has not been set, the height passed in will be cached and used to set the
height immediately after the child widget is set.
Note that subclasses may have a different behavior. A subclass may decide
not to change the height of the child widget. It may instead decide to
change the height of an internal panel widget, which contains the child
widget.
Parameters: height - the object's new height, in CSS units (e.g. "10px", "1em") |
setPopupPosition | public void setPopupPosition(int left, int top)(Code) | | Sets the popup's position relative to the browser's client area. The
popup's position may be set before calling
PopupPanel.show() .
Parameters: left - the left position, in pixels Parameters: top - the top position, in pixels |
setPopupPositionAndShow | public void setPopupPositionAndShow(PositionCallback callback)(Code) | | Sets the popup's position using a
PositionCallback , and shows the
popup. The callback allows positioning to be performed based on the
offsetWidth and offsetHeight of the popup, which are normally not available
until the popup is showing. By positioning the popup before it is shown,
the the popup will not jump from its original position to the new position.
Parameters: callback - the callback to set the position of the popup See Also: PositionCallback.setPosition(int offsetWidthint offsetHeight) |
setVisible | public void setVisible(boolean visible)(Code) | | Sets whether this object is visible.
Parameters: visible - true to show the object, false to hide it |
setWidth | public void setWidth(String width)(Code) | | Sets the width of the panel's child widget. If the panel's child widget has
not been set, the width passed in will be cached and used to set the width
immediately after the child widget is set.
Note that subclasses may have a different behavior. A subclass may decide
not to change the width of the child widget. It may instead decide to
change the width of an internal panel widget, which contains the child
widget.
Parameters: width - the object's new width, in CSS units (e.g. "10px", "1em") |
show | public void show()(Code) | | Shows the popup. It must have a child widget before this method is called.
|
|
|