|
||||||||||
| 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
@DefaultProperty(value="listData") 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 | |
|---|---|
static interface |
ListButton.Skin
ListButton skin interface. |
| Nested classes/interfaces inherited from class org.apache.pivot.wtk.Button |
|---|
Button.ButtonDataBindMapping, Button.DataRenderer, Button.SelectedBindMapping, Button.State, Button.StateBindMapping |
| Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component |
|---|
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary |
| Constructor Summary | |
|---|---|
ListButton()
Creates an empty list button. |
|
ListButton(org.apache.pivot.collections.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,
org.apache.pivot.collections.List<?> listData)
Creates a list button with the given button and list data. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears any bound values in the component. |
org.apache.pivot.util.Filter<?> |
getDisabledItemFilter()
Returns the disabled item filter. |
ListView.ItemRenderer |
getItemRenderer()
Returns the renderer used to display items in the list. |
org.apache.pivot.util.ListenerList<ListButtonBindingListener> |
getListButtonBindingListeners()
Returns the list button binding listener list. |
org.apache.pivot.util.ListenerList<ListButtonItemListener> |
getListButtonItemListeners()
Returns the list button item listener list. |
org.apache.pivot.util.ListenerList<ListButtonListener> |
getListButtonListeners()
Returns the list button listener list. |
org.apache.pivot.util.ListenerList<ListButtonSelectionListener> |
getListButtonSelectionListeners()
Returns the list button selection listener list. |
org.apache.pivot.collections.List<?> |
getListData()
Returns the list data associated with this list button. |
ListView.ListDataBindMapping |
getListDataBindMapping()
|
BindType |
getListDataBindType()
|
String |
getListDataKey()
|
Window |
getListPopup()
|
int |
getListSize()
Returns the list size. |
int |
getSelectedIndex()
Returns the current selection. |
Object |
getSelectedItem()
|
ListView.ItemBindMapping |
getSelectedItemBindMapping()
|
BindType |
getSelectedItemBindType()
|
String |
getSelectedItemKey()
|
boolean |
isItemDisabled(int index)
Returns an item's disabled state. |
boolean |
isRepeatable()
Returns the list button's repeatable flag. |
void |
load(Object context)
Copies bound values from the bind context to the component. |
void |
setDisabledItemFilter(org.apache.pivot.util.Filter<?> disabledItemFilter)
Sets the disabled item filter. |
void |
setItemRenderer(ListView.ItemRenderer itemRenderer)
Sets the renderer used to display items in the list. |
void |
setListData(org.apache.pivot.collections.List<?> listData)
Sets the list button's list data. |
void |
setListData(String listData)
Sets the list button's list data. |
void |
setListData(URL listData)
Sets the list button's list data. |
void |
setListDataBindMapping(ListView.ListDataBindMapping listDataBindMapping)
|
void |
setListDataBindType(BindType listDataBindType)
|
void |
setListDataKey(String listDataKey)
|
void |
setListSize(int listSize)
Sets the list size. |
void |
setRepeatable(boolean repeatable)
Sets the list button's repeatable flag. |
void |
setSelectedIndex(int selectedIndex)
Sets the selection. |
void |
setSelectedItem(Object item)
|
void |
setSelectedItemBindMapping(ListView.ItemBindMapping selectedItemBindMapping)
|
void |
setSelectedItemBindType(BindType selectedItemBindType)
|
void |
setSelectedItemKey(String selectedItemKey)
|
protected void |
setSkin(Skin skin)
Sets the skin, replacing any previous skin. |
void |
setToggleButton(boolean toggleButton)
Sets the button's toggle state. |
void |
store(Object context)
Copies bound values from the component to the bind context. |
| 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(org.apache.pivot.collections.List<?> listData)
listData -
public ListButton(Object buttonData,
org.apache.pivot.collections.List<?> listData)
buttonData - listData - | Method Detail |
|---|
protected void setSkin(Skin skin)
Component
setSkin in class Componentskin - The new skin.public Window getListPopup()
public void setToggleButton(boolean toggleButton)
Button
setToggleButton in class ButtonUnsupportedOperationException - This method is not supported by ListButton.public org.apache.pivot.collections.List<?> getListData()
public void setListData(org.apache.pivot.collections.List<?> listData)
listData - The list data to be presented by the list button.public final void setListData(String listData)
listData - The list data to be presented by the list button as a JSON array.public void setListData(URL listData)
listData - A URL referring to a JSON file containing the data to be presented by
the list button.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 boolean isRepeatable()
public void setRepeatable(boolean repeatable)
repeatable - 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 org.apache.pivot.util.Filter<?> getDisabledItemFilter()
public void setDisabledItemFilter(org.apache.pivot.util.Filter<?> disabledItemFilter)
disabledItemFilter - The disabled item filter, or null for no disabled item filter.public int getListSize()
public void setListSize(int listSize)
listSize - public String getListDataKey()
public void setListDataKey(String listDataKey)
public BindType getListDataBindType()
public void setListDataBindType(BindType listDataBindType)
public ListView.ListDataBindMapping getListDataBindMapping()
public void setListDataBindMapping(ListView.ListDataBindMapping listDataBindMapping)
public String getSelectedItemKey()
public void setSelectedItemKey(String selectedItemKey)
public BindType getSelectedItemBindType()
public void setSelectedItemBindType(BindType selectedItemBindType)
public ListView.ItemBindMapping getSelectedItemBindMapping()
public void setSelectedItemBindMapping(ListView.ItemBindMapping selectedItemBindMapping)
public void load(Object context)
Component
load in class Buttonpublic void store(Object context)
Component
store in class Buttonpublic void clear()
Component
clear in class Buttonpublic org.apache.pivot.util.ListenerList<ListButtonListener> getListButtonListeners()
public org.apache.pivot.util.ListenerList<ListButtonItemListener> getListButtonItemListeners()
public org.apache.pivot.util.ListenerList<ListButtonSelectionListener> getListButtonSelectionListeners()
public org.apache.pivot.util.ListenerList<ListButtonBindingListener> getListButtonBindingListeners()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||