|
|||||||||
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.DeckPanel
public class DeckPanel
A panel that displays all of its child widgets in a 'deck', where only one
can be visible at a time. It is used by
TabPanel
.
Once a widget has been added to a DeckPanel, its visibility, width, and height attributes will be manipulated. When the widget is removed from the DeckPanel, it will be visible, and its width and height attributes will be cleared.
Constructor Summary | |
---|---|
DeckPanel()
Creates an empty deck panel. |
Method Summary | |
---|---|
void |
add(Widget w)
Adds the specified widget to the deck. |
int |
getVisibleWidget()
Gets the index of the currently-visible widget. |
void |
insert(Widget w,
int beforeIndex)
Inserts a widget before the specified index. |
boolean |
remove(Widget w)
Removes a child widget. |
void |
showWidget(int index)
Shows the widget at the specified index. |
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 DeckPanel()
Method Detail |
---|
public void add(Widget w)
add
in interface HasWidgets
add
in class Panel
w
- the widget to be addedHasWidgets.add(Widget)
public int getVisibleWidget()
public void insert(Widget w, int beforeIndex)
w
- the widget to be insertedbeforeIndex
- the index before which it will be inserted
java.lang.IndexOutOfBoundsException
- if beforeIndex
is out of
rangepublic boolean remove(Widget w)
Panel
How to Override this Method
There are several important things that must take place in the correct order to properly remove a Widget from a Panel. Not all of these steps will be relevant to every Panel, but all of the steps must be considered.
false
if it is not.Panel.orphan(Widget)
first while the child
Widget is still attached.WidgetCollection
.
remove
in interface HasWidgets
remove
in class ComplexPanel
w
- the widget to be removed
true
if the child was presentpublic void showWidget(int index)
index
- the index of the widget to be shown
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |