public interface SelectList extends HTMLComponent
Represents a selection list UI component
Please note:
For unresolved PolyScope entities, like Features, Variables and TCPs, that are selected in the
list, the item will be highlighted with a yellow border.
The implementation of the list have special rules and rendering for Variable
objects.
Unregistered variables are not visible nor selectable (until they become registered).
Modifier and Type | Method and Description |
---|---|
void |
addAllItems(List<?> items) |
void |
addItem(Object item) |
void |
clearSelection()
unselect currently selected item(s)
|
int |
getItemCount() |
Object[] |
getItems() |
int |
getSelectedIndex() |
int[] |
getSelectedIndices() |
Object |
getSelectedItem() |
Object[] |
getSelectedItems() |
void |
refresh()
Update the rendering of the list element
|
void |
removeAllItems()
Remove all items
|
void |
removeItem(Object item) |
void |
selectItems(Object... item) |
void |
selectItemsAtIndices(int... indices) |
void |
setItems(List<?> items) |
isEnabled, isVisible, setEnabled, setVisible
void setItems(List<?> items)
items
- clear the current items and set the list of items to items
void addItem(Object item)
item
- add a new item to the drop downvoid addAllItems(List<?> items)
items
- add the list of items
void removeItem(Object item)
item
- remove itemvoid removeAllItems()
Remove all items
void clearSelection()
unselect currently selected item(s)
void selectItems(Object... item)
item
- select the itemsvoid selectItemsAtIndices(int... indices)
indices
- select the items at indices. The first element is at index 0.int getItemCount()
Object[] getSelectedItems()
Object getSelectedItem()
null
if there is no selection.int getSelectedIndex()
-1
if there is
no selection.int[] getSelectedIndices()
Object[] getItems()
void refresh()
Update the rendering of the list element
Copyright © 2019. All rights reserved.