|
|||||||||
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.ComplexPanel
com.google.gwt.user.client.ui.AbsolutePanel
public class AbsolutePanel
An absolute panel positions all of its children absolutely, allowing them to overlap.
Note that this panel will not automatically resize itself to allow enough room for its absolutely-positioned children. It must be explicitly sized in order to make room for them.
Once a widget has been added to an absolute panel, the panel effectively "owns" the positioning of the widget. Any existing positioning attributes on the widget may be modified by the panel.
Constructor Summary | |
---|---|
AbsolutePanel()
Creates an empty absolute panel. |
Method Summary | |
---|---|
void |
add(Widget w)
Adds a child widget to this panel. |
void |
add(Widget w,
int left,
int top)
Adds a widget to the panel at the specified position. |
int |
getWidgetLeft(Widget w)
Gets the position of the left outer border edge of the widget relative to the left outer border edge of the panel. |
int |
getWidgetTop(Widget w)
Gets the position of the top outer border edge of the widget relative to the top outer border edge of the panel. |
boolean |
remove(Widget w)
Overrides ComplexPanel.remove(Widget) to change the removed
Widget's element back to static positioning.This is done so that any
positioning changes to the widget that were done by the panel are undone
when the widget is disowned from the panel. |
void |
setWidgetPosition(Widget w,
int left,
int top)
Sets the position of the specified child widget. |
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel |
---|
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, insert, insert, iterator, remove |
Methods inherited from class com.google.gwt.user.client.ui.Panel |
---|
adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, onLoad, onUnload, orphan |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
getParent, isAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setElement |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, 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 AbsolutePanel()
Method Detail |
---|
public void add(Widget w)
add
in interface HasWidgets
add
in class Panel
w
- the child widget to be addedHasWidgets.add(Widget)
public void add(Widget w, int left, int top)
(-1, -1)
will cause the child widget to be positioned
statically.
w
- the widget to be addedleft
- the widget's left positiontop
- the widget's top positionpublic int getWidgetLeft(Widget w)
w
- the widget whose position is to be retrieved
public int getWidgetTop(Widget w)
w
- the widget whose position is to be retrieved
public boolean remove(Widget w)
ComplexPanel.remove(Widget)
to change the removed
Widget's element back to static positioning.This is done so that any
positioning changes to the widget that were done by the panel are undone
when the widget is disowned from the panel.
remove
in interface HasWidgets
remove
in class ComplexPanel
w
- the widget to be removed
true
if the child was presentpublic void setWidgetPosition(Widget w, int left, int top)
(-1, -1)
will cause the child widget to be positioned
statically.
w
- the child widget to be positionedleft
- the widget's left positiontop
- the widget's top position
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |