T
- type of items that will be listed.public final class ListSingleSelection<T> extends ListSelection<T>
T
: only 1 item can be selected.Module: work-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>work-api</artifactId> </dependency>
values
Constructor and Description |
---|
ListSingleSelection(List<T> values)
Creates a new ListSingleSelection object.
|
ListSingleSelection(T... values)
Creates a new ListSingleSelection object.
|
Modifier and Type | Method and Description |
---|---|
T |
getSelectedValue()
Get the item that is currently selected.
|
void |
setSelectedValue(T val)
Set the
val item of type T as selected in the ListSingleSelection. |
addListener, getListeners, getPossibleValues, listChanged, removeListener, selectionChanged, setPossibleValues
public ListSingleSelection(T... values)
example :
ListSingleSelection lss = new ListSingleSelection("1","2","3","4")
values
- An arbitrary number of values of type T that can be selected.public ListSingleSelection(List<T> values)
example :
List list = ArrayList();
list.add("1");
list.add("2");
list.add("3");
list.add("4");
ListSingleSelection lss = new ListSingleSelection(list);
values
- The list of values of type T that can be selected. This list
may be empty, but not null.Copyright 2011-2015 Cytoscape Consortium. All rights reserved.