|
|||||||||||
| 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
A panel that can "pop up" over other widgets. It overlays the browser's client area (and any previously-created popups).
code
| Field Summary |
| Fields inherited from class java.lang.Object |
typeId, typeName |
| Constructor Summary | |
PopupPanel()
Creates an empty popup panel. |
|
PopupPanel(boolean autoHide)
Creates an empty popup panel, specifying its "auto-hide" property. |
|
| Method Summary | |
boolean |
add(Widget w)
Adds a new child widget to the panel. |
void |
addPopupListener(PopupListener listener)
Adds a listener interface to receive popup events. |
void |
hide()
Hides the popup. |
boolean |
onEventPreview(Event event)
Called when a browser event occurs and this event preview is on top of the preview stack. |
boolean |
onKeyDownPreview(char key,
int modifiers)
Popups get an opportunity to preview keyboard events before they are passed to any other widget. |
boolean |
onKeyPressPreview(char key,
int modifiers)
Popups get an opportunity to preview keyboard events before they are passed to any other widget. |
boolean |
onKeyUpPreview(char key,
int modifiers)
Popups get an opportunity to preview keyboard events before they are passed to any other widget. |
void |
removePopupListener(PopupListener listener)
Removes a previously added popup listener. |
void |
setHeight(String height)
Sets the object's height. |
void |
setPixelSize(int width,
int height)
Sets the object's size, in pixels, not including decorations such as border, margin, and padding. |
void |
setPopupPosition(int left,
int top)
Sets the popup's position relative to the browser's client area. |
void |
setStyleName(String style)
Sets the object's style name, removing all other styles. |
void |
setWidth(String width)
Sets the object's width. |
void |
show()
Shows the popup. |
| Methods inherited from class com.google.gwt.user.client.ui.SimplePanel |
clear, getContainerElement, getWidget, getWidgetCount, getWidgetIndex, iterator, remove, 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 |
public PopupPanel()
public PopupPanel(boolean autoHide)
autoHide - true if the popup should be automatically
hidden when the user clicks outside of it| Method Detail |
public boolean add(Widget w)
Panel
add in class SimplePanelpublic void addPopupListener(PopupListener listener)
SourcesPopupEvents
addPopupListener in interface SourcesPopupEventslistener - the listener interface to add.public void hide()
public boolean onEventPreview(Event event)
EventPreview
onEventPreview in interface EventPreviewevent - the browser event
false to cancel the eventDOM.addEventPreview(EventPreview)
public boolean onKeyDownPreview(char key,
int modifiers)
key - the key code of the depressed keymodifiers - keyboard modifiers, as specified in
KeyboardListener.
false to suppress the event
public boolean onKeyPressPreview(char key,
int modifiers)
key - the unicode character pressedmodifiers - keyboard modifiers, as specified in
KeyboardListener.
false to suppress the event
public boolean onKeyUpPreview(char key,
int modifiers)
key - the key code of the released keymodifiers - keyboard modifiers, as specified in
KeyboardListener.
false to suppress the eventpublic void removePopupListener(PopupListener listener)
SourcesPopupEvents
removePopupListener in interface SourcesPopupEventslistener - the listener interface to remove.public void setHeight(String height)
UIObject
setHeight in class UIObjectheight - the object's new height, in CSS units (e.g. "10px", "1em")
public void setPixelSize(int width,
int height)
UIObject
setPixelSize in class UIObjectwidth - the object's new width, in pixelsheight - the object's new height, in pixels
public void setPopupPosition(int left,
int top)
left - the left position, in pixelstop - the top position, in pixelspublic void setStyleName(String style)
UIObject
The style name is the name referred to in CSS style rules (in HTML, this is
referred to as the element's "class"). By convention, style rules are of
the form [project]-[widget] (e.g. the Button widget's
style name is .gwt-Button).
For example, if a widget's style name is myProject-MyWidget,
then the style rule that applies to it will be
.myProject-MyWidget. Note the "dot" prefix -- this is
necessary because calling this method sets the underlying element's
className property.
An object may have any number of style names, which may be manipulated
using UIObject.addStyleName(String) and UIObject.removeStyleName(String).
The attributes of all styles associated with the object will be applied to
it.
setStyleName in class UIObjectstyle - the style name to be addedUIObject.addStyleName(String),
UIObject.removeStyleName(String)public void setWidth(String width)
UIObject
setWidth in class UIObjectwidth - the object's new width, in CSS units (e.g. "10px", "1em")public void show()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||