public class ListCarousel extends AbstractCarousel
AbstractCarousel
autoHide, cursor, cyclic, horizontal
EMPTY_ELEMENT_ARRAY
Constructor and Description |
---|
ListCarousel(boolean horizontal,
boolean cyclic)
Creates a list carousel without cursor.
|
ListCarousel(boolean horizontal,
boolean cyclic,
PagingIndicator cursor,
boolean autoHideCursor)
Creates a list carousel with a cursor that can be hidden automatically or not.
|
Modifier and Type | Method and Description |
---|---|
void |
onMove(int position)
The content is moved to the given position.
|
protected SwipeEventHandler |
setBoundsChildren(Rectangle bounds,
int widgetsCount)
Sets the bounds of the children.
|
protected Rectangle |
validateChildren(int boundsWidth,
int boundsHeight,
boolean horizontal)
Lays out the children.
|
add, getSelectedIndex, goTo, goTo, goToNext, goToNext, goToPrevious, goToPrevious, handleEvent, hideNotify, moveWidget, onStartAnimation, onStopAnimation, remove, removeAllWidgets, setBoundsContent, setSelectedIndex, showNotify, validateContent
addClassSelector, contains, gainFocus, getAttribute, getChild, getChildrenCount, getChildrenElements, getParentElement, getStyle, hasClassSelector, isInState, isTransparent, lostFocus, mergeStyle, removeAllClassSelectors, removeClassSelector, removeInstanceStyle, render, renderContent, setBounds, setClassSelectors, setEnabled, updateStyle, updateStyleOnly, validate
getFocus, getFocusIndex, getNext, getWidget, getWidgetAt, getWidgets, getWidgetsCount, iterator, requestFocus, requestFocus, requestFocusFrom
getAbsoluteX, getAbsoluteX, getAbsoluteY, getAbsoluteY, getEventHandler, getHeight, getPanel, getParent, getPreferredHeight, getPreferredWidth, getRelativeX, getRelativeY, getWidth, getX, getY, hasFocus, invalidate, isEnabled, isShown, isValid, isVisible, repaint, repaint, revalidate, revalidateSubTree, setEventHandler, setLocation, setPreferredSize, setSize, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEventHandler, getHeight, getWidth, getX, getY, isShown, repaint, repaint, setEventHandler
public ListCarousel(boolean horizontal, boolean cyclic)
horizontal
- true
if the carousel is horizontal, false
otherwise.cyclic
- true
if the carousel is cyclic, false
otherwise.public ListCarousel(boolean horizontal, boolean cyclic, PagingIndicator cursor, boolean autoHideCursor)
horizontal
- true
if the carousel is horizontal, false
otherwise.cyclic
- true
if the carousel is cyclic, false
otherwise.cursor
- the cursor that indicate the progress in the carousel.autoHideCursor
- true
if the cursor hides automatically, false
otherwise.protected Rectangle validateChildren(int boundsWidth, int boundsHeight, boolean horizontal)
AbstractCarousel
validateChildren
in class AbstractCarousel
boundsWidth
- the width hint.boundsHeight
- the height hint.horizontal
- true
if the carousel is horizontal, false
otherwise.protected SwipeEventHandler setBoundsChildren(Rectangle bounds, int widgetsCount)
AbstractCarousel
setBoundsChildren
in class AbstractCarousel
bounds
- the bounds of this carousel.widgetsCount
- the number of widgets in the carousel.public void onMove(int position)
Swipeable
position
- the new position