|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WWidget
eu.webtoolkit.jwt.WWebWidget
eu.webtoolkit.jwt.WInteractWidget
eu.webtoolkit.jwt.WContainerWidget
eu.webtoolkit.jwt.WStackedWidget
public class WStackedWidget
A container widget that stacks its widgets on top of each other.
This is a container widget which at all times has only one item visible. The widget accomplishes this using setHidden(bool) on the children.
Using getCurrentIndex() and
setCurrentIndex() you can
retrieve or set the visible widget.
WStackedWidget, like WContainerWidget, is by default not inline.
The widget is rendered using an HTML <div> tag and does
not provide styling. It can be styled using inline or external CSS as
appropriate.
WMenu| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WContainerWidget |
|---|
WContainerWidget.Overflow |
| Constructor Summary | |
|---|---|
WStackedWidget()
Creates a new stack. |
|
WStackedWidget(WContainerWidget parent)
Creates a new stack. |
|
| Method Summary | |
|---|---|
void |
addWidget(WWidget widget)
Adds a child widget to this container. |
int |
getCurrentIndex()
Returns the index of the widget that is currently shown. |
WWidget |
getCurrentWidget()
Returns the widget that is currently shown. |
void |
insertWidget(int index,
WWidget widget)
Insert a widget at a given index. |
void |
setCurrentIndex(int index)
Changes the current widget. |
void |
setCurrentIndex(int index,
WAnimation animation)
Changes the current widget using a custom animation. |
void |
setCurrentIndex(int index,
WAnimation animation,
boolean autoReverse)
Changes the current widget using a custom animation. |
void |
setCurrentWidget(WWidget widget)
Changes the current widget. |
void |
setTransitionAnimation(WAnimation animation)
Specifies an animation used during transitions. |
void |
setTransitionAnimation(WAnimation animation,
boolean autoReverse)
Specifies an animation used during transitions. |
| Methods inherited from class eu.webtoolkit.jwt.WContainerWidget |
|---|
clear, getContentAlignment, getCount, getIndexOf, getLayout, getPadding, getWidget, insertBefore, isList, isOrderedList, isUnorderedList, remove, removeWidget, scrolled, setContentAlignment, setContentAlignment, setLayout, setLayout, setLayout, setList, setList, setOverflow, setOverflow, setOverflow, setPadding, setPadding, setPadding |
| Methods inherited from class eu.webtoolkit.jwt.WInteractWidget |
|---|
clicked, doubleClicked, enterPressed, escapePressed, gestureChanged, gestureEnded, gestureStarted, isEnabled, keyPressed, keyWentDown, keyWentUp, load, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, propagateSetEnabled, setDraggable, setDraggable, setDraggable, setDraggable, touchEnded, touchMoved, touchStarted |
| Methods inherited from class eu.webtoolkit.jwt.WWidget |
|---|
acceptDrops, acceptDrops, addCssRule, addCssRule, addStyleClass, animateHide, animateShow, boxBorder, boxPadding, containsExposed, disable, dropEvent, enable, getDrop, getJsRef, getParent, hide, htmlText, isLayoutSizeAware, layoutSizeChanged, positionAt, positionAt, removeStyleClass, resize, setClearSides, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, tr |
| Methods inherited from class eu.webtoolkit.jwt.WObject |
|---|
getObjectName, setObjectName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WStackedWidget(WContainerWidget parent)
public WStackedWidget()
Calls this((WContainerWidget)null)
| Method Detail |
|---|
public void addWidget(WWidget widget)
WContainerWidgetThis is equivalent to passing this container as the parent when constructing the child. The widget is appended to the list of children, and thus also layed-out at the end.
addWidget in class WContainerWidgetpublic int getCurrentIndex()
setCurrentIndex(int index),
getCurrentWidget()public WWidget getCurrentWidget()
setCurrentWidget(WWidget widget),
getCurrentIndex()
public void insertWidget(int index,
WWidget widget)
insertWidget in class WContainerWidgetWContainerWidget.insertBefore(WWidget widget, WWidget before)public void setCurrentIndex(int index)
The widget with index index is made visible, while all other
widgets are hidden.
The change of current widget is done using the animation settings
specified by
setTransitionAnimation().
The default value for current index is 0 (provided thath
getCurrentIndex(),
setCurrentWidget(WWidget widget)
public void setCurrentIndex(int index,
WAnimation animation,
boolean autoReverse)
getCurrentIndex(),
setCurrentWidget(WWidget widget)
public final void setCurrentIndex(int index,
WAnimation animation)
Calls
setCurrentIndex(index, animation, true)
public void setCurrentWidget(WWidget widget)
The widget widget, which must have been added before, is
made visible, while all other widgets are hidden.
getCurrentWidget(),
setCurrentIndex(int index)
public void setTransitionAnimation(WAnimation animation,
boolean autoReverse)
The animation is used to hide the previously current widget and show the
next current widget using
setCurrentIndex().
The initial value for animation is WAnimation(), specifying
no animation.
When autoReverse is set to true, then the
reverse animation is chosen when the new index precedes the current
index. This only applies to WAnimation::SlideLeft,
WAnimation::SlideRight, WAnimation::SlideUp or WAnimation::SlideDown
transition effects.
setCurrentIndex(int index)public final void setTransitionAnimation(WAnimation animation)
Calls
setTransitionAnimation(animation, false)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||