|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- public interface DropDown<T>
The DropDown interface is the Nifty control API view of a Nifty DropDown control.
Nested Class Summary | |
---|---|
static interface |
DropDown.DropDownViewConverter<T>
You'll need to implement this interface to change the way your model class T needs to be displayed in the DropDown. |
static class |
DropDown.SimpleDropDownViewConverter<T>
A simple implementation of DropDownViewConverter that will just use item.toString(). |
Method Summary | |
---|---|
void |
addAllItems(List<T> itemsToAdd)
Add all items to the DropDown. |
void |
addItem(T newItem)
Add a item to the DropDown. |
void |
clear()
Clear all items from this DropDown. |
List<T> |
getItems()
Get all items of this DropDown. |
int |
getSelectedIndex()
Returns the index of the current selected item in the list of all items. |
T |
getSelection()
Get the current selection. |
void |
insertItem(T item,
int index)
Insert the given item at the given index. |
int |
itemCount()
Retrieve the number of items in the DropDown. |
void |
removeAllItems(List<T> itemsToRemove)
Remove all items given in the List from this DropDown. |
void |
removeItem(T item)
Remove the given item from the DropDown. |
void |
removeItemByIndex(int itemIndex)
Remove an item from the DropDown by index. |
void |
selectItem(T item)
Select the item in the DropDown. |
void |
selectItemByIndex(int selectionIndex)
Select the item with the given index in the DropDown. |
void |
setViewConverter(DropDown.DropDownViewConverter<T> viewConverter)
Change the DropDownViewConverter for this DropDown. |
Methods inherited from interface de.lessvoid.nifty.controls.NiftyControl |
---|
disable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, layoutCallback, setEnabled, setFocus, setFocusable, setHeight, setId, setStyle, setWidth |
Method Detail |
---|
void setViewConverter(DropDown.DropDownViewConverter<T> viewConverter)
viewConverter
- DropDownViewConvertervoid addItem(T newItem)
newItem
- the item to addvoid insertItem(T item, int index)
item
- itemindex
- the index to insert the item.int itemCount()
void clear()
void selectItemByIndex(int selectionIndex)
selectionIndex
- the item index to select in the DropDownvoid selectItem(T item)
item
- the item to selectT getSelection()
int getSelectedIndex()
void removeItemByIndex(int itemIndex)
itemIndex
- remove the item with the given index from the DropDownvoid removeItem(T item)
item
- the item to remove from the DropDownList<T> getItems()
void addAllItems(List<T> itemsToAdd)
itemsToAdd
- all items to addvoid removeAllItems(List<T> itemsToRemove)
itemsToRemove
- list of items to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |