|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.Component
org.apache.pivot.wtk.Button
org.apache.pivot.wtk.ListButton
public class ListButton
Component that allows a user to select one of several list options. The options are hidden until the user pushes the button.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Button |
---|
Button.DataRenderer, Button.Group, Button.GroupListener, Button.NamedGroupDictionary, Button.NamedGroupDictionaryListener, Button.State |
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component |
---|
Component.ComponentDictionary, Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary |
Constructor Summary | |
---|---|
ListButton()
Creates an empty list button. |
|
ListButton(List<?> listData)
Creates a list button with no button data and the given list data. |
|
ListButton(Object buttonData)
Creates a list button with the given button data and an empty list. |
|
ListButton(Object buttonData,
List<?> listData)
Creates a list button with the given button and list data. |
Method Summary | |
---|---|
Filter<?> |
getDisabledItemFilter()
Returns the disabled item filter. |
ListView.ItemRenderer |
getItemRenderer()
Returns the renderer used to display items in the list. |
ListenerList<ListButtonListener> |
getListButtonListeners()
Returns the list button listener list. |
ListenerList<ListButtonSelectionListener> |
getListButtonSelectionListeners()
Returns the list button selection listener list. |
List<?> |
getListData()
Returns the list data associated with this list button. |
int |
getSelectedIndex()
Returns the current selection. |
Object |
getSelectedItem()
|
String |
getSelectedItemKey()
|
boolean |
isItemDisabled(int index)
Returns an item's disabled state. |
void |
load(Dictionary<String,?> context)
Copies bound values from the bind context to the component. |
void |
setDisabledItemFilter(Filter<?> disabledItemFilter)
Sets the disabled item filter. |
void |
setItemRenderer(ListView.ItemRenderer itemRenderer)
Sets the renderer used to display items in the list. |
void |
setListData(List<?> listData)
Sets the list button's list data. |
void |
setListData(String listData)
Sets the list button's list data. |
void |
setSelectedIndex(int selectedIndex)
Sets the selection. |
void |
setSelectedItem(Object item)
|
void |
setSelectedItemKey(String selectedItemKey)
|
void |
setToggleButton(boolean toggleButton)
Sets the button's toggle state. |
void |
store(Dictionary<String,?> context)
Copies bound values from the component to the bind context. |
Methods inherited from class org.apache.pivot.wtk.Button |
---|
getAction, getButtonData, getButtonListeners, getButtonPressListeners, getButtonStateListeners, getDataRenderer, getGroup, getNamedGroupDictionaryListeners, getNamedGroups, getSelectedKey, getState, getStateKey, isSelected, isToggleButton, isTriState, press, setAction, setAction, setButtonData, setDataRenderer, setEnabled, setGroup, setGroup, setSelected, setSelectedKey, setState, setState, setStateKey, setTriState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ListButton()
public ListButton(Object buttonData)
buttonData
- public ListButton(List<?> listData)
listData
- public ListButton(Object buttonData, List<?> listData)
buttonData
- listData
- Method Detail |
---|
public void setToggleButton(boolean toggleButton)
Button
setToggleButton
in class Button
UnsupportedOperationException
- This method is not supported by ListButton.public List<?> getListData()
public void setListData(List<?> listData)
listData
- The list data to be presented by the list button.public void setListData(String listData)
listData
- The list data to be presented by the list button as a JSON array.public ListView.ItemRenderer getItemRenderer()
public void setItemRenderer(ListView.ItemRenderer itemRenderer)
Use Button.setDataRenderer(org.apache.pivot.wtk.Button.DataRenderer)
to define
the renderer used to draw the button data.
itemRenderer
- The item renderer instance.public int getSelectedIndex()
public void setSelectedIndex(int selectedIndex)
selectedIndex
- The index of the list item to select, or -1 to clear the
selection.public Object getSelectedItem()
public void setSelectedItem(Object item)
public boolean isItemDisabled(int index)
index
- The index of the item whose disabled state is to be tested.
public Filter<?> getDisabledItemFilter()
public void setDisabledItemFilter(Filter<?> disabledItemFilter)
disabledItemFilter
- The disabled item filter, or null for no disabled item filter.public String getSelectedItemKey()
public void setSelectedItemKey(String selectedItemKey)
public void load(Dictionary<String,?> context)
Component
load
in class Button
public void store(Dictionary<String,?> context)
Component
store
in class Button
public ListenerList<ListButtonListener> getListButtonListeners()
public ListenerList<ListButtonSelectionListener> getListButtonSelectionListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |