|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.Component
pivot.wtk.Container
pivot.wtk.Spinner
public class Spinner
Component that presents a means of cycling through a list of items.
Nested Class Summary | |
---|---|
static interface |
Spinner.ItemRenderer
Spinner renderer interface. |
static interface |
Spinner.Skin
Spinner skin interface. |
Nested classes/interfaces inherited from class pivot.wtk.Component |
---|
Component.Attributes, Component.ComponentDictionary, Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary |
Nested classes/interfaces inherited from interface pivot.collections.Sequence |
---|
Sequence.Search, Sequence.Sort, Sequence.Tree |
Constructor Summary | |
---|---|
Spinner()
Creates a spinner populated with an empty array list. |
|
Spinner(List<?> spinnerData)
Creates a spinner populated with the given spinner data. |
Method Summary | |
---|---|
Bounds |
getContentBounds()
Gets the bounding area of the spinner content (the area in which the item renderer will render the content). |
Spinner.ItemRenderer |
getItemRenderer()
Returns the item renderer used for items in this list. |
int |
getSelectedIndex()
Returns the currently selected index. |
Object |
getSelectedItem()
|
String |
getSelectedItemKey()
Gets the data binding key that is set on this spinner. |
List<?> |
getSpinnerData()
Returns the spinner data. |
ListenerList<SpinnerItemListener> |
getSpinnerItemListeners()
Returns the spinner item listener list. |
ListenerList<SpinnerListener> |
getSpinnerListeners()
Returns the spinner listener list. |
ListenerList<SpinnerSelectionListener> |
getSpinnerSelectionListeners()
Returns the spinner selection listener list. |
boolean |
isCircular()
|
void |
load(Dictionary<String,?> context)
Propagates binding to subcomponents. |
void |
setCircular(boolean circular)
|
void |
setItemRenderer(Spinner.ItemRenderer itemRenderer)
Sets the item renderer to be used for items in this list. |
void |
setSelectedIndex(int selectedIndex)
Sets the selection to the specified index. |
void |
setSelectedItem(Object item)
|
void |
setSelectedItemKey(String selectedItemKey)
Sets this spinner's data binding key. |
protected void |
setSkin(Skin skin)
Sets the skin, replacing any previous skin. |
void |
setSpinnerData(List<?> spinnerData)
Sets the spinner data. |
void |
setSpinnerData(String spinnerData)
|
void |
store(Dictionary<String,?> context)
Propagates binding to subcomponents. |
Methods inherited from class pivot.wtk.Container |
---|
add, containsFocus, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getContextKey, getDescendantAt, getFocusTraversalPolicy, getLength, indexOf, insert, isAncestor, isFocusable, iterator, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, remove, removeAll, requestFocus, setContextKey, setEnabled, setFocusTraversalPolicy, setParent, setTooltip, setVisible, update, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Spinner()
public Spinner(List<?> spinnerData)
spinnerData
- Method Detail |
---|
public List<?> getSpinnerData()
public void setSpinnerData(List<?> spinnerData)
spinnerData
- The data to be presented by the spinner.public void setSpinnerData(String spinnerData)
protected void setSkin(Skin skin)
Component
setSkin
in class Component
skin
- The new skin.public Spinner.ItemRenderer getItemRenderer()
public void setItemRenderer(Spinner.ItemRenderer itemRenderer)
itemRenderer
- The item renderer for the list.public boolean isCircular()
public void setCircular(boolean circular)
public int getSelectedIndex()
public void setSelectedIndex(int selectedIndex)
selectedIndex
- The index to select, or -1 to clear the selection.public Object getSelectedItem()
public void setSelectedItem(Object item)
public String getSelectedItemKey()
public void setSelectedItemKey(String selectedItemKey)
public void load(Dictionary<String,?> context)
Container
load
in class Container
public void store(Dictionary<String,?> context)
Container
store
in class Container
public Bounds getContentBounds()
public ListenerList<SpinnerListener> getSpinnerListeners()
public ListenerList<SpinnerItemListener> getSpinnerItemListeners()
public ListenerList<SpinnerSelectionListener> getSpinnerSelectionListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |