ListBox when accessing NiftyControls.@Deprecated public class ListBoxControl<T> extends AbstractController implements ListBox<T>, ListBoxView<T>
ListBox.ListBoxViewConverter<T>, ListBox.ListBoxViewConverterSimple<T>, ListBox.SelectionMode| Constructor and Description |
|---|
ListBoxControl()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAllItems(List<T> itemsToAdd)
Deprecated.
Add all items to the ListBox.
|
void |
addItem(T newItem)
Deprecated.
Add a item to the ListBox.
|
void |
bind(Nifty niftyParam,
Screen screenParam,
Element elementParam,
Properties parameterParam,
Attributes controlDefinitionAttributes)
Deprecated.
|
void |
changeSelectionMode(ListBox.SelectionMode listBoxSelectionMode,
boolean forceSelection)
Deprecated.
Change the
ListBox.SelectionMode to a new one. |
void |
clear()
Deprecated.
Clear all items from this ListBox.
|
void |
deselectItem(T item)
Deprecated.
Deselect the given item.
|
void |
deselectItemByIndex(int itemIndex)
Deprecated.
Deselect the item with the given itemIndex.
|
void |
display(List<T> visibleItems,
int focusElement,
List<Integer> selectedElements)
Deprecated.
Display the given descriptions.
|
void |
ensureWidthConstraints()
Deprecated.
|
int |
getDisplayItemCount()
Deprecated.
Returns the number of items this ListBox can display without being scrolled.
|
T |
getFocusItem()
Deprecated.
Get the current item that has the focus.
|
int |
getFocusItemIndex()
Deprecated.
Get the index of the current focus item.
|
List<T> |
getItems()
Deprecated.
Get all items of this ListBox.
|
List<Integer> |
getSelectedIndices()
Deprecated.
Get the current selection as a list of indices.
|
List<T> |
getSelection()
Deprecated.
Get the current selection.
|
ListBox.ListBoxViewConverter<T> |
getViewConverter()
Deprecated.
|
int |
getWidth(T item)
Deprecated.
Return the width of the given item.
|
void |
init(Properties parameter,
Attributes controlDefinitionAttributes)
Deprecated.
|
boolean |
inputEvent(NiftyInputEvent inputEvent)
Deprecated.
|
void |
insertItem(T item,
int index)
Deprecated.
Insert the given item at the given index.
|
int |
itemCount()
Deprecated.
Retrieve the number of items in the ListBox.
|
void |
layoutCallback()
Deprecated.
|
void |
mouseWheel(Element e,
NiftyMouseInputEvent inputEvent)
Deprecated.
|
void |
onFocus(boolean getFocus)
Deprecated.
|
void |
onStartScreen()
Deprecated.
|
void |
publish(ListBoxSelectionChangedEvent<T> event)
Deprecated.
Publish this event.
|
void |
refresh()
Deprecated.
Refresh the Listbox display.
|
void |
removeAllItems(List<T> itemsToRemove)
Deprecated.
Remove all items given in the List from this ListBox.
|
void |
removeItem(T item)
Deprecated.
Remove the given item from the ListBox.
|
void |
removeItemByIndex(int itemIndex)
Deprecated.
Remove an item from the ListBox by index.
|
void |
scrollTo(int newPosition)
Deprecated.
Scroll the view to the given position.
|
void |
selectItem(T item)
Deprecated.
Select the item in the ListBox.
|
void |
selectItemByIndex(int selectionIndex)
Deprecated.
Select the item with the given index in the ListBox.
|
void |
selectNext()
Deprecated.
Select the next item.
|
void |
selectPrevious()
Deprecated.
Select the previous item.
|
void |
setFocus()
Deprecated.
|
void |
setFocusItem(T item)
Deprecated.
Change the current focus item to the item given.
|
void |
setFocusItemByIndex(int itemIndex)
Deprecated.
Change the current focus item to the given index.
|
void |
setListBoxViewConverter(ListBox.ListBoxViewConverter<T> viewConverter)
Deprecated.
Change the ListBoxViewConverter for this ListBox.
|
void |
showItem(T item)
Deprecated.
Make sure the given item is visible.
|
void |
showItemByIndex(int itemIndex)
Deprecated.
Make sure the given item is visible.
|
void |
sortAllItems()
Deprecated.
Sort all items using natural ordering.
|
void |
sortAllItems(Comparator<T> comperator)
Deprecated.
Sort all items using the given comperator.
|
void |
updateTotalCount(int newCount)
Deprecated.
Updates the view with the total count of elements currently in the ListBox.
|
void |
updateTotalWidth(int newWidth)
Deprecated.
Update the ListBox view with the given width.
|
bind, disable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, setEnabled, setFocusable, setHeight, setId, setStyle, setWidthclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdisable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, setEnabled, setFocusable, setHeight, setId, setStyle, setWidthpublic void bind(Nifty niftyParam, Screen screenParam, Element elementParam, Properties parameterParam, Attributes controlDefinitionAttributes)
bind in interface Controllerpublic void init(Properties parameter, Attributes controlDefinitionAttributes)
init in interface Controllerinit in class AbstractControllerpublic void onStartScreen()
onStartScreen in interface Controllerpublic void mouseWheel(Element e, NiftyMouseInputEvent inputEvent)
public boolean inputEvent(NiftyInputEvent inputEvent)
inputEvent in interface Controllerpublic void onFocus(boolean getFocus)
onFocus in interface ControlleronFocus in class AbstractControllerpublic void setFocus()
setFocus in interface NiftyControlsetFocus in class AbstractControllerpublic ListBox.ListBoxViewConverter<T> getViewConverter()
public void display(List<T> visibleItems, int focusElement, List<Integer> selectedElements)
ListBoxViewdisplay in interface ListBoxView<T>public void updateTotalCount(int newCount)
ListBoxViewupdateTotalCount in interface ListBoxView<T>newCount - the new count to displaypublic void updateTotalWidth(int newWidth)
ListBoxViewupdateTotalWidth in interface ListBoxView<T>newWidth - new maximum width of all items in the ListBoxpublic void ensureWidthConstraints()
public void layoutCallback()
layoutCallback in interface NiftyControllayoutCallback in class AbstractControllerpublic void scrollTo(int newPosition)
ListBoxViewscrollTo in interface ListBoxView<T>newPosition - the new index to scroll topublic int getWidth(T item)
ListBoxViewgetWidth in interface ListBoxView<T>item - the item to get the width forpublic void changeSelectionMode(ListBox.SelectionMode listBoxSelectionMode, boolean forceSelection)
ListBoxListBox.SelectionMode to a new one.changeSelectionMode in interface ListBox<T>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 addItem(T newItem)
ListBoxpublic void insertItem(T item, int index)
ListBoxinsertItem in interface ListBox<T>item - 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 ListBox<T>selectionIndex - the item index to select in the ComboBoxpublic void selectItem(T item)
ListBoxselectItem in interface ListBox<T>item - the item to selectpublic void selectNext()
ListBoxselectNext in interface ListBox<T>public void selectPrevious()
ListBoxselectPrevious in interface ListBox<T>public void deselectItemByIndex(int itemIndex)
ListBoxdeselectItemByIndex in interface ListBox<T>itemIndex - item index to deselectpublic void deselectItem(T item)
ListBoxdeselectItem in interface ListBox<T>item - item to deselect.public List<T> getSelection()
ListBoxgetSelection in interface ListBox<T>public List<Integer> getSelectedIndices()
ListBoxgetSelectedIndices in interface ListBox<T>public void removeItemByIndex(int itemIndex)
ListBoxremoveItemByIndex in interface ListBox<T>itemIndex - remove the item with the given index from the ListBoxpublic void removeItem(T item)
ListBoxremoveItem in interface ListBox<T>item - the item to remove from the ListBoxpublic List<T> getItems()
ListBoxpublic void showItem(T item)
ListBoxpublic void showItemByIndex(int itemIndex)
ListBoxshowItemByIndex in interface ListBox<T>itemIndex - the item index to make visiblepublic void setFocusItem(T item)
ListBoxsetFocusItem in interface ListBox<T>item - the item to set the focus topublic void setFocusItemByIndex(int itemIndex)
ListBoxsetFocusItemByIndex in interface ListBox<T>itemIndex - the new focus itempublic T getFocusItem()
ListBoxgetFocusItem in interface ListBox<T>public int getFocusItemIndex()
ListBoxgetFocusItemIndex in interface ListBox<T>public void setListBoxViewConverter(ListBox.ListBoxViewConverter<T> viewConverter)
ListBoxsetListBoxViewConverter in interface ListBox<T>viewConverter - ListBoxViewConverterpublic void publish(ListBoxSelectionChangedEvent<T> event)
ListBoxViewpublish in interface ListBoxView<T>event - the event to publishpublic void addAllItems(List<T> itemsToAdd)
ListBoxaddAllItems in interface ListBox<T>itemsToAdd - all items to addpublic void removeAllItems(List<T> itemsToRemove)
ListBoxremoveAllItems in interface ListBox<T>itemsToRemove - list of items to removepublic void sortAllItems()
ListBoxsortAllItems in interface ListBox<T>public void sortAllItems(Comparator<T> comperator)
ListBoxsortAllItems in interface ListBox<T>public int getDisplayItemCount()
ListBoxgetDisplayItemCount in interface ListBox<T>Copyright © 2013. All Rights Reserved.