|
||||||||||
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 NiftyControl
public String getId()
getId
in interface NiftyControl
public void setId(String id)
setId
in interface NiftyControl
public int getWidth()
getWidth
in interface NiftyControl
public void setWidth(SizeValue width)
setWidth
in interface NiftyControl
public int getHeight()
getHeight
in interface NiftyControl
public void setHeight(SizeValue height)
setHeight
in interface NiftyControl
public String getStyle()
getStyle
in interface NiftyControl
public void setStyle(String style)
setStyle
in interface NiftyControl
public void enable()
enable
in interface NiftyControl
public void disable()
disable
in interface NiftyControl
public void setEnabled(boolean enabled)
setEnabled
in interface NiftyControl
public boolean isEnabled()
isEnabled
in interface NiftyControl
public void changeSelectionMode(ListBox.SelectionMode listBoxSelectionMode, boolean forceSelection)
ListBox
ListBox.SelectionMode
to a new one.
changeSelectionMode
in interface ListBox
listBoxSelectionMode
- 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 ListBox
viewConverter
- ListBoxViewConverterpublic void addItem(Object newItem)
ListBox
addItem
in interface ListBox
newItem
- the item to addpublic void insertItem(Object item, int index)
ListBox
insertItem
in interface ListBox
item
- itemindex
- the index to insert the item.public int itemCount()
ListBox
itemCount
in interface ListBox
public void clear()
ListBox
clear
in interface ListBox
public void selectItemByIndex(int selectionIndex)
ListBox
ListBoxSingleSelectionMode
is used or
it will add to the selection if ListBoxMultiSelectionMode
is used.
selectItemByIndex
in interface ListBox
selectionIndex
- the item index to select in the ComboBoxpublic void selectItem(Object item)
ListBox
selectItem
in interface ListBox
item
- the item to selectpublic void selectNext()
ListBox
selectNext
in interface ListBox
public void selectPrevious()
ListBox
selectPrevious
in interface ListBox
public void deselectItemByIndex(int itemIndex)
ListBox
deselectItemByIndex
in interface ListBox
itemIndex
- item index to deselectpublic void deselectItem(Object item)
ListBox
deselectItem
in interface ListBox
item
- item to deselect.public List getSelection()
ListBox
getSelection
in interface ListBox
public void removeItemByIndex(int itemIndex)
ListBox
removeItemByIndex
in interface ListBox
itemIndex
- remove the item with the given index from the ListBoxpublic void removeItem(Object item)
ListBox
removeItem
in interface ListBox
item
- the item to remove from the ListBoxpublic List getItems()
ListBox
getItems
in interface ListBox
public void showItem(Object item)
ListBox
showItem
in interface ListBox
item
- the itempublic void showItemByIndex(int itemIndex)
ListBox
showItemByIndex
in interface ListBox
itemIndex
- the item index to make visiblepublic void setFocusItem(Object item)
ListBox
setFocusItem
in interface ListBox
item
- the item to set the focus topublic void setFocusItemByIndex(int itemIndex)
ListBox
setFocusItemByIndex
in interface ListBox
itemIndex
- the new focus itempublic Object getFocusItem()
ListBox
getFocusItem
in interface ListBox
public int getFocusItemIndex()
ListBox
getFocusItemIndex
in interface ListBox
public void addAllItems(List itemsToAdd)
ListBox
addAllItems
in interface ListBox
itemsToAdd
- all items to addpublic void removeAllItems(List itemsToRemove)
ListBox
removeAllItems
in interface ListBox
itemsToRemove
- list of items to removepublic void sortAllItems()
ListBox
sortAllItems
in interface ListBox
public void sortAllItems(Comparator comperator)
ListBox
sortAllItems
in interface ListBox
public void setFocus()
setFocus
in interface NiftyControl
public void setFocusable(boolean focusable)
setFocusable
in interface NiftyControl
public List<Integer> getSelectedIndices()
ListBox
getSelectedIndices
in interface ListBox
public int getDisplayItemCount()
ListBox
getDisplayItemCount
in interface ListBox
public boolean hasFocus()
hasFocus
in interface NiftyControl
public void layoutCallback()
layoutCallback
in interface NiftyControl
public boolean isBound()
isBound
in interface NiftyControl
public void refresh()
ListBox
refresh
in interface ListBox
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |