|
GWT 2.7.0 | |||||||
| 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel |
|---|
InsertPanel.ForIsWidget |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets |
|---|
HasWidgets.ForIsWidget |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.Widget |
|---|
eventsToSink |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERROR |
| Constructor Summary | |
|---|---|
DeckPanel()
Creates an empty deck panel. |
|
| Method Summary | |
|---|---|
void |
add(Widget w)
Adds a child widget. |
int |
getVisibleWidget()
Gets the index of the currently-visible widget, if any. |
void |
insert(IsWidget w,
int beforeIndex)
|
void |
insert(Widget w,
int beforeIndex)
Inserts a child widget before the specified index. |
boolean |
isAnimationEnabled()
Returns true if animations are enabled, false if not. |
boolean |
remove(Widget w)
Removes a child widget. |
void |
setAnimationEnabled(boolean enable)
Enable or disable animations. |
void |
showWidget(int index)
Shows the widget at the specified index. |
| Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel |
|---|
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, doLogicalClear, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove |
| Methods inherited from class com.google.gwt.user.client.ui.Panel |
|---|
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, ensureHandlers, fireEvent, getHandlerCount, getHandlerManager, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, replaceElement, setLayoutData, setParent, sinkEvents, unsinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget |
|---|
add |
| Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget |
|---|
getWidgetIndex |
| Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel |
|---|
getWidget, getWidgetCount, getWidgetIndex, remove |
| Constructor Detail |
|---|
public DeckPanel()
| Method Detail |
|---|
public void add(Widget w)
PanelHow to Override this Method
There are several important things that must take place in the correct order to properly add or insert a Widget to a Panel. Not all of these steps will be relevant to every Panel, but all of the steps must be considered.
ComplexPanel.adjustIndex(Widget, int).Widget.removeFromParent() on the
Widget.WidgetCollection at the appropriate index.Panel.adopt(Widget) to finalize the add as the
very last step.
add in interface HasWidgetsadd in interface InsertPaneladd in class Panelw - the widget to be addedHasWidgets.add(Widget)public int getVisibleWidget()
public void insert(IsWidget w,
int beforeIndex)
insert in interface InsertPanel.ForIsWidget
public void insert(Widget w,
int beforeIndex)
InsertPanel
insert in interface InsertPanelw - the child widget to be insertedbeforeIndex - the index before which it will be insertedpublic boolean isAnimationEnabled()
HasAnimation
isAnimationEnabled in interface HasAnimationpublic boolean remove(Widget w)
PanelHow 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 HasWidgetsremove in class ComplexPanelw - the widget to be removed
true if the child was presentpublic void setAnimationEnabled(boolean enable)
HasAnimation
setAnimationEnabled in interface HasAnimationenable - true to enable, false to disablepublic void showWidget(int index)
index - the index of the widget to be shown
|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||