public abstract class PagingIndicator extends StyledWidget
EMPTY_ELEMENT_ARRAY
Constructor and Description |
---|
PagingIndicator()
Creates an horizontal paging indicator.
|
PagingIndicator(boolean horizontal)
Creates a paging indicator.
|
Modifier and Type | Method and Description |
---|---|
int |
getItemsCount()
Gets the number of items.
|
float |
getPercent()
Gets the percent of the selection.
|
int |
getSelectedItem()
Gets the selected item.
|
abstract void |
hide()
Hides the scroll indicator.
|
boolean |
isHorizontal()
Gets whether the paging indicator is horizontal or not.
|
void |
setHorizontal(boolean horizontal)
Sets whether the paging indicator is horizontal or not.
|
void |
setItemsCount(int itemsCount)
Sets the number of items.
|
void |
setSelectedItem(int item,
float percent)
Sets the selected item.
|
abstract void |
show()
Shows the scroll indicator.
|
addClassSelector, contains, gainFocus, getAttribute, getChild, getChildrenCount, getChildrenElements, getContentBounds, getParentElement, getStyle, hasClassSelector, isInState, isTransparent, lostFocus, mergeStyle, removeAllClassSelectors, removeClassSelector, removeInstanceStyle, render, setClassSelectors, setEnabled, updateStyle, updateStyleOnly, validate
getAbsoluteX, getAbsoluteX, getAbsoluteY, getAbsoluteY, getEventHandler, getHeight, getPanel, getParent, getPreferredHeight, getPreferredWidth, getRelativeX, getRelativeY, getWidgetAt, getWidth, getX, getY, handleEvent, hasFocus, hideNotify, invalidate, isEnabled, isShown, isValid, isVisible, repaint, repaint, requestFocus, requestFocus, revalidate, revalidateSubTree, setBounds, setEventHandler, setLocation, setPreferredSize, setSize, setVisible, showNotify
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
renderContent, validateContent
public PagingIndicator()
public PagingIndicator(boolean horizontal)
horizontal
- true
if the paging indicator is horizontal, false
otherwise.public void setHorizontal(boolean horizontal)
horizontal
- true
if the paging indicator is horizontal, false
otherwise.public boolean isHorizontal()
true
if the paging indicator is horizontal, false
otherwise.public void setItemsCount(int itemsCount)
itemsCount
- the items count to set.public int getItemsCount()
public void setSelectedItem(int item, float percent)
A percentage is given along the index to indicate whether the selected item is fully selected or not. A
percentage of 1.0f
means that the selected item is fully selected, 0.0f
means that the
next item is fully selected.
item
- the selected item.percent
- the selection level, 1.0f
means that the item is fully selected.java.lang.IllegalArgumentException
- if the given item is not in the range of the items (between 0
included and
itemsCount
excluded).java.lang.IllegalArgumentException
- if the given percent is not between 0.0f
and 1.0f
included.setItemsCount(int)
public int getSelectedItem()
public float getPercent()
public abstract void show()
public abstract void hide()