public class ListBoxNull extends Object implements ListBox
ListBox.ListBoxViewConverter<T>, ListBox.ListBoxViewConverterSimple<T>, ListBox.SelectionMode| Constructor and Description |
|---|
ListBoxNull() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 NiftyControlpublic 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)
ListBoxsetListBoxViewConverter in interface ListBoxviewConverter - ListBoxViewConverterpublic void addItem(Object newItem)
ListBoxpublic void insertItem(Object item, int index)
ListBoxinsertItem in interface ListBoxitem - itemindex - the index to insert the item.public int itemCount()
ListBoxpublic void clear()
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)
ListBoxselectItem in interface ListBoxitem - the item to selectpublic void selectNext()
ListBoxselectNext in interface ListBoxpublic void selectPrevious()
ListBoxselectPrevious in interface ListBoxpublic void deselectItemByIndex(int itemIndex)
ListBoxdeselectItemByIndex in interface ListBoxitemIndex - item index to deselectpublic void deselectItem(Object item)
ListBoxdeselectItem in interface ListBoxitem - item to deselect.public List getSelection()
ListBoxgetSelection in interface ListBoxpublic void removeItemByIndex(int itemIndex)
ListBoxremoveItemByIndex in interface ListBoxitemIndex - remove the item with the given index from the ListBoxpublic void removeItem(Object item)
ListBoxremoveItem in interface ListBoxitem - the item to remove from the ListBoxpublic List getItems()
ListBoxpublic void showItem(Object item)
ListBoxpublic void showItemByIndex(int itemIndex)
ListBoxshowItemByIndex in interface ListBoxitemIndex - the item index to make visiblepublic void setFocusItem(Object item)
ListBoxsetFocusItem in interface ListBoxitem - the item to set the focus topublic void setFocusItemByIndex(int itemIndex)
ListBoxsetFocusItemByIndex in interface ListBoxitemIndex - the new focus itempublic Object getFocusItem()
ListBoxgetFocusItem in interface ListBoxpublic int getFocusItemIndex()
ListBoxgetFocusItemIndex in interface ListBoxpublic void addAllItems(List itemsToAdd)
ListBoxaddAllItems in interface ListBoxitemsToAdd - all items to addpublic void removeAllItems(List itemsToRemove)
ListBoxremoveAllItems in interface ListBoxitemsToRemove - list of items to removepublic void sortAllItems()
ListBoxsortAllItems in interface ListBoxpublic void sortAllItems(Comparator comperator)
ListBoxsortAllItems in interface ListBoxpublic void setFocus()
setFocus in interface NiftyControlpublic void setFocusable(boolean focusable)
setFocusable in interface NiftyControlpublic List<Integer> getSelectedIndices()
ListBoxgetSelectedIndices in interface ListBoxpublic int getDisplayItemCount()
ListBoxgetDisplayItemCount in interface ListBoxpublic boolean hasFocus()
hasFocus in interface NiftyControlpublic void layoutCallback()
layoutCallback in interface NiftyControlpublic boolean isBound()
isBound in interface NiftyControlCopyright © 2013. All Rights Reserved.