|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.lessvoid.nifty.controls.nullobjects.ListBoxNull
public class ListBoxNull
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface de.lessvoid.nifty.controls.ListBox |
|---|
ListBox.ListBoxViewConverter<T>, ListBox.ListBoxViewConverterSimple<T>, ListBox.SelectionMode |
| Constructor Summary | |
|---|---|
ListBoxNull()
|
|
| Method Summary | |
|---|---|
void |
addAllItems(List itemsToAdd)
Add all items to the ListBox. |
void |
addItem(Object newItem)
Add a item to the ListBox. |
void |
changeSelectionMode(ListBox.SelectionMode listBoxSelectionMode,
boolean forceSelection)
Change the ListBox.SelectionMode to a new one. |
void |
clear()
Clear all items from this ListBox. |
void |
deselectItem(Object item)
Deselect the given item. |
void |
deselectItemByIndex(int itemIndex)
Deselect the item with the given itemIndex. |
void |
disable()
|
void |
enable()
|
int |
getDisplayItemCount()
Returns the number of items this ListBox can display without being scrolled. |
Element |
getElement()
|
Object |
getFocusItem()
Get the current item that has the focus. |
int |
getFocusItemIndex()
Get the index of the current focus item. |
int |
getHeight()
|
String |
getId()
|
List |
getItems()
Get all items of this ListBox. |
List<Integer> |
getSelectedIndices()
Get the current selection as a list of indices. |
List |
getSelection()
Get the current selection. |
String |
getStyle()
|
int |
getWidth()
|
boolean |
hasFocus()
|
void |
insertItem(Object item,
int index)
Insert the given item at the given index. |
boolean |
isBound()
|
boolean |
isEnabled()
|
int |
itemCount()
Retrieve the number of items in the ListBox. |
void |
layoutCallback()
|
void |
refresh()
Refresh the Listbox display. |
void |
removeAllItems(List itemsToRemove)
Remove all items given in the List from this ListBox. |
void |
removeItem(Object item)
Remove the given item from the ListBox. |
void |
removeItemByIndex(int itemIndex)
Remove an item from the ListBox by index. |
void |
selectItem(Object item)
Select the item in the ListBox. |
void |
selectItemByIndex(int selectionIndex)
Select the item with the given index in the ListBox. |
void |
selectNext()
Select the next item. |
void |
selectPrevious()
Select the previous item. |
void |
setEnabled(boolean enabled)
|
void |
setFocus()
|
void |
setFocusable(boolean focusable)
|
void |
setFocusItem(Object item)
Change the current focus item to the item given. |
void |
setFocusItemByIndex(int itemIndex)
Change the current focus item to the given index. |
void |
setHeight(SizeValue height)
|
void |
setId(String id)
|
void |
setListBoxViewConverter(ListBox.ListBoxViewConverter viewConverter)
Change the ListBoxViewConverter for this ListBox. |
void |
setStyle(String style)
|
void |
setWidth(SizeValue width)
|
void |
showItem(Object item)
Make sure the given item is visible. |
void |
showItemByIndex(int itemIndex)
Make sure the given item is visible. |
void |
sortAllItems()
Sort all items using natural ordering. |
void |
sortAllItems(Comparator comperator)
Sort all items using the given comperator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ListBoxNull()
| Method Detail |
|---|
public Element getElement()
getElement in interface NiftyControlpublic String getId()
getId in interface NiftyControlpublic void setId(String id)
setId in interface NiftyControlpublic int getWidth()
getWidth in interface NiftyControlpublic void setWidth(SizeValue width)
setWidth in interface NiftyControlpublic int getHeight()
getHeight in interface NiftyControlpublic void setHeight(SizeValue height)
setHeight in interface NiftyControlpublic String getStyle()
getStyle in interface NiftyControlpublic void setStyle(String style)
setStyle in interface NiftyControlpublic void enable()
enable in interface NiftyControlpublic void disable()
disable in interface NiftyControlpublic void setEnabled(boolean enabled)
setEnabled in interface NiftyControlpublic boolean isEnabled()
isEnabled in interface NiftyControl
public void changeSelectionMode(ListBox.SelectionMode listBoxSelectionMode,
boolean forceSelection)
ListBoxListBox.SelectionMode to a new one.
changeSelectionMode in interface ListBoxlistBoxSelectionMode - the new ListBox.SelectionMode to useforceSelection - if set to true will not allow de selecting the last item in the selection and
it will automatically select the first item added. when set to false it's possible to have no
selection at all.public void setListBoxViewConverter(ListBox.ListBoxViewConverter viewConverter)
ListBox
setListBoxViewConverter in interface ListBoxviewConverter - ListBoxViewConverterpublic void addItem(Object newItem)
ListBox
addItem in interface ListBoxnewItem - the item to add
public void insertItem(Object item,
int index)
ListBox
insertItem in interface ListBoxitem - itemindex - the index to insert the item.public int itemCount()
ListBox
itemCount in interface ListBoxpublic void clear()
ListBox
clear in interface ListBoxpublic void selectItemByIndex(int selectionIndex)
ListBoxListBoxSingleSelectionMode is used or
it will add to the selection if ListBoxMultiSelectionMode is used.
selectItemByIndex in interface ListBoxselectionIndex - the item index to select in the ComboBoxpublic void selectItem(Object item)
ListBox
selectItem in interface ListBoxitem - the item to selectpublic void selectNext()
ListBox
selectNext in interface ListBoxpublic void selectPrevious()
ListBox
selectPrevious in interface ListBoxpublic void deselectItemByIndex(int itemIndex)
ListBox
deselectItemByIndex in interface ListBoxitemIndex - item index to deselectpublic void deselectItem(Object item)
ListBox
deselectItem in interface ListBoxitem - item to deselect.public List getSelection()
ListBox
getSelection in interface ListBoxpublic void removeItemByIndex(int itemIndex)
ListBox
removeItemByIndex in interface ListBoxitemIndex - remove the item with the given index from the ListBoxpublic void removeItem(Object item)
ListBox
removeItem in interface ListBoxitem - the item to remove from the ListBoxpublic List getItems()
ListBox
getItems in interface ListBoxpublic void showItem(Object item)
ListBox
showItem in interface ListBoxitem - the itempublic void showItemByIndex(int itemIndex)
ListBox
showItemByIndex in interface ListBoxitemIndex - the item index to make visiblepublic void setFocusItem(Object item)
ListBox
setFocusItem in interface ListBoxitem - the item to set the focus topublic void setFocusItemByIndex(int itemIndex)
ListBox
setFocusItemByIndex in interface ListBoxitemIndex - the new focus itempublic Object getFocusItem()
ListBox
getFocusItem in interface ListBoxpublic int getFocusItemIndex()
ListBox
getFocusItemIndex in interface ListBoxpublic void addAllItems(List itemsToAdd)
ListBox
addAllItems in interface ListBoxitemsToAdd - all items to addpublic void removeAllItems(List itemsToRemove)
ListBox
removeAllItems in interface ListBoxitemsToRemove - list of items to removepublic void sortAllItems()
ListBox
sortAllItems in interface ListBoxpublic void sortAllItems(Comparator comperator)
ListBox
sortAllItems in interface ListBoxpublic void setFocus()
setFocus in interface NiftyControlpublic void setFocusable(boolean focusable)
setFocusable in interface NiftyControlpublic List<Integer> getSelectedIndices()
ListBox
getSelectedIndices in interface ListBoxpublic int getDisplayItemCount()
ListBox
getDisplayItemCount in interface ListBoxpublic boolean hasFocus()
hasFocus in interface NiftyControlpublic void layoutCallback()
layoutCallback in interface NiftyControlpublic boolean isBound()
isBound in interface NiftyControlpublic void refresh()
ListBox
refresh in interface ListBox
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||