Controller, ListBox<T>, ListBoxView<T>, NiftyControlTreeBoxControlListBox when accessing NiftyControls.@Deprecated public class ListBoxControl<T> extends AbstractController implements ListBox<T>, ListBoxView<T>
ListBox.ListBoxViewConverter<T>, ListBox.ListBoxViewConverterSimple<T>, ListBox.SelectionMode| Constructor | Description |
|---|---|
ListBoxControl() |
Deprecated.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addAllItems(java.util.Collection<T> itemsToAdd) |
Deprecated.
Add all items to the ListBox.
|
void |
addItem(T newItem) |
Deprecated.
Add a item to the ListBox.
|
void |
addItemProcessor(ListBoxItemProcessor processor) |
Deprecated.
|
void |
bind(Nifty nifty,
Screen screen,
Element element,
Parameters parameter) |
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(java.util.List<T> visibleItems,
int focusElement,
java.util.List<java.lang.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.
|
Scrollbar |
getHorizontalScrollbar() |
Deprecated.
Get the Horizontal scrollbar of this listBox.
|
java.util.List<T> |
getItems() |
Deprecated.
Get all items of this ListBox.
|
java.util.List<java.lang.Integer> |
getSelectedIndices() |
Deprecated.
Get the current selection as a list of indices.
|
java.util.List<T> |
getSelection() |
Deprecated.
Get the current selection.
|
Scrollbar |
getVerticalScrollbar() |
Deprecated.
Get the Vertical scrollbar of this listBox.
|
ListBox.ListBoxViewConverter<T> |
getViewConverter() |
Deprecated.
|
int |
getWidth(T item) |
Deprecated.
Return the width of the given item.
|
void |
init(Parameters parameter) |
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 |
onStartScreen() |
Deprecated.
|
void |
publish(ListBoxSelectionChangedEvent<T> event) |
Deprecated.
Publish this event.
|
void |
refresh() |
Deprecated.
Refresh the Listbox display.
|
void |
removeAllItems(java.util.Collection<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(java.util.Comparator<T> comparator) |
Deprecated.
Sort all items using the given comparator.
|
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, onEndScreen, onFocus, setEnabled, setFocusable, setHeight, setId, setStyle, setWidthdisable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, setEnabled, setFocusable, setHeight, setId, setStyle, setWidthpublic void bind(@Nonnull
Nifty nifty,
@Nonnull
Screen screen,
@Nonnull
Element element,
@Nonnull
Parameters parameter)
bind in interface Controller@Nullable public Scrollbar getVerticalScrollbar()
ListBoxgetVerticalScrollbar in interface ListBox<T>Scrollbar@Nullable public Scrollbar getHorizontalScrollbar()
ListBoxgetHorizontalScrollbar in interface ListBox<T>Scrollbarpublic void init(@Nonnull
Parameters parameter)
init in interface Controllerinit in class AbstractControllerpublic void onStartScreen()
onStartScreen in interface Controllerpublic void mouseWheel(@Nonnull
Element e,
@Nonnull
NiftyMouseInputEvent inputEvent)
public boolean inputEvent(@Nonnull
NiftyInputEvent inputEvent)
inputEvent in interface Controllerpublic void setFocus()
setFocus in interface NiftyControlsetFocus in class AbstractController@Nullable public ListBox.ListBoxViewConverter<T> getViewConverter()
public void display(@Nonnull
java.util.List<T> visibleItems,
int focusElement,
@Nonnull
java.util.List<java.lang.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(@Nonnull
T item)
ListBoxViewgetWidth in interface ListBoxView<T>item - the item to get the width forpublic void changeSelectionMode(@Nonnull
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(@Nonnull
T newItem)
ListBoxpublic void insertItem(@Nonnull
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)
ListBoxListBox.SelectionMode.Single is used or it will add to the selection if ListBox.SelectionMode.Multiple is used.selectItemByIndex in interface ListBox<T>selectionIndex - the item index to select in the ComboBoxpublic void selectItem(@Nonnull
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(@Nonnull
T item)
ListBoxdeselectItem in interface ListBox<T>item - item to deselect.@Nonnull public java.util.List<T> getSelection()
ListBoxgetSelection in interface ListBox<T>@Nonnull public java.util.List<java.lang.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(@Nonnull
T item)
ListBoxremoveItem in interface ListBox<T>item - the item to remove from the ListBox@Nonnull public java.util.List<T> getItems()
ListBoxpublic void showItem(@Nonnull
T item)
ListBoxpublic void showItemByIndex(int itemIndex)
ListBoxshowItemByIndex in interface ListBox<T>itemIndex - the item index to make visiblepublic void setFocusItem(@Nullable
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 item@Nullable public T getFocusItem()
ListBoxgetFocusItem in interface ListBox<T>public int getFocusItemIndex()
ListBoxgetFocusItemIndex in interface ListBox<T>public void setListBoxViewConverter(@Nonnull
ListBox.ListBoxViewConverter<T> viewConverter)
ListBoxsetListBoxViewConverter in interface ListBox<T>viewConverter - ListBoxViewConverterpublic void publish(@Nonnull
ListBoxSelectionChangedEvent<T> event)
ListBoxViewpublish in interface ListBoxView<T>event - the event to publishpublic void addAllItems(@Nonnull
java.util.Collection<T> itemsToAdd)
ListBoxaddAllItems in interface ListBox<T>itemsToAdd - all items to addpublic void removeAllItems(@Nonnull
java.util.Collection<T> itemsToRemove)
ListBoxremoveAllItems in interface ListBox<T>itemsToRemove - list of items to removepublic void sortAllItems()
ListBoxsortAllItems in interface ListBox<T>public void sortAllItems(@Nullable
java.util.Comparator<T> comparator)
ListBoxsortAllItems in interface ListBox<T>public int getDisplayItemCount()
ListBoxgetDisplayItemCount in interface ListBox<T>public void refresh()
ListBoxpublic void addItemProcessor(@Nonnull
ListBoxItemProcessor processor)
addItemProcessor in interface ListBox<T>Copyright © 2018. All rights reserved.