|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.lessvoid.nifty.controls.AbstractController
de.lessvoid.nifty.controls.listbox.ListBoxControl<T>
ListBox when accessing NiftyControls.
@Deprecated public class ListBoxControl<T>
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface de.lessvoid.nifty.controls.ListBox |
|---|
ListBox.ListBoxViewConverter<T>, ListBox.ListBoxViewConverterSimple<T>, ListBox.SelectionMode |
| Constructor Summary | |
|---|---|
ListBoxControl()
Deprecated. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class de.lessvoid.nifty.controls.AbstractController |
|---|
bind, disable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, setEnabled, setFocusable, setHeight, setId, setStyle, setWidth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.lessvoid.nifty.controls.NiftyControl |
|---|
disable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, setEnabled, setFocusable, setHeight, setId, setStyle, setWidth |
| Constructor Detail |
|---|
public ListBoxControl()
| Method Detail |
|---|
public void bind(Nifty niftyParam,
Screen screenParam,
Element elementParam,
Properties parameterParam,
Attributes controlDefinitionAttributes)
bind in interface Controller
public void init(Properties parameter,
Attributes controlDefinitionAttributes)
init in interface Controllerinit in class AbstractControllerpublic void onStartScreen()
onStartScreen in interface Controller
public 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)
ListBoxView
display in interface ListBoxView<T>public void updateTotalCount(int newCount)
ListBoxView
updateTotalCount in interface ListBoxView<T>newCount - the new count to displaypublic void updateTotalWidth(int newWidth)
ListBoxView
updateTotalWidth 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)
ListBoxView
scrollTo in interface ListBoxView<T>newPosition - the new index to scroll topublic int getWidth(T item)
ListBoxView
getWidth in interface ListBoxView<T>item - the item to get the width for
public 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)
ListBox
addItem in interface ListBox<T>newItem - the item to add
public void insertItem(T item,
int index)
ListBox
insertItem in interface ListBox<T>item - itemindex - the index to insert the item.public int itemCount()
ListBox
itemCount in interface ListBox<T>public void clear()
ListBox
clear in interface ListBox<T>public 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)
ListBox
selectItem in interface ListBox<T>item - the item to selectpublic void selectNext()
ListBox
selectNext in interface ListBox<T>public void selectPrevious()
ListBox
selectPrevious in interface ListBox<T>public void deselectItemByIndex(int itemIndex)
ListBox
deselectItemByIndex in interface ListBox<T>itemIndex - item index to deselectpublic void deselectItem(T item)
ListBox
deselectItem in interface ListBox<T>item - item to deselect.public List<T> getSelection()
ListBox
getSelection in interface ListBox<T>public List<Integer> getSelectedIndices()
ListBox
getSelectedIndices in interface ListBox<T>public void removeItemByIndex(int itemIndex)
ListBox
removeItemByIndex in interface ListBox<T>itemIndex - remove the item with the given index from the ListBoxpublic void removeItem(T item)
ListBox
removeItem in interface ListBox<T>item - the item to remove from the ListBoxpublic List<T> getItems()
ListBox
getItems in interface ListBox<T>public void showItem(T item)
ListBox
showItem in interface ListBox<T>item - the itempublic void showItemByIndex(int itemIndex)
ListBox
showItemByIndex in interface ListBox<T>itemIndex - the item index to make visiblepublic void setFocusItem(T item)
ListBox
setFocusItem in interface ListBox<T>item - the item to set the focus topublic void setFocusItemByIndex(int itemIndex)
ListBox
setFocusItemByIndex in interface ListBox<T>itemIndex - the new focus itempublic T getFocusItem()
ListBox
getFocusItem in interface ListBox<T>public int getFocusItemIndex()
ListBox
getFocusItemIndex in interface ListBox<T>public void setListBoxViewConverter(ListBox.ListBoxViewConverter<T> viewConverter)
ListBox
setListBoxViewConverter in interface ListBox<T>viewConverter - ListBoxViewConverterpublic void publish(ListBoxSelectionChangedEvent<T> event)
ListBoxView
publish in interface ListBoxView<T>event - the event to publishpublic void addAllItems(List<T> itemsToAdd)
ListBox
addAllItems in interface ListBox<T>itemsToAdd - all items to addpublic void removeAllItems(List<T> itemsToRemove)
ListBox
removeAllItems in interface ListBox<T>itemsToRemove - list of items to removepublic void sortAllItems()
ListBox
sortAllItems in interface ListBox<T>public void sortAllItems(Comparator<T> comperator)
ListBox
sortAllItems in interface ListBox<T>public int getDisplayItemCount()
ListBox
getDisplayItemCount in interface ListBox<T>public void refresh()
ListBox
refresh in interface ListBox<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||