Package org.cytoscape.work.util
Class ListSelection<T>
java.lang.Object
org.cytoscape.work.util.ListSelection<T>
- Type Parameters:
T
- type of item that will be listed.
- Direct Known Subclasses:
ListMultipleSelection
,ListSingleSelection
A ListSelection object.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener(ListChangeListener<T> changeListener)
Adds a listener that will listen for changes to this objectReturns the list of listeners that will listen for changes to this objectTo get all the items of theList
.values protected void
Alert all listeners that the list has changedvoid
removeListener(ListChangeListener<T> changeListener)
Removes a listener from the list that will listen for changes to this objectprotected void
Alert all listeners that the selection has changedvoid
setPossibleValues(List<T> values)
Changes the set of possible values in the list
-
Field Details
-
values
Declares a List of items of typeT
.
-
-
Constructor Details
-
ListSelection
Creates a new ListSelection object.- Parameters:
values
- List of items of typeT
that contains the one(s) that is(are) going to be selected. The list of values my be empty.
-
-
Method Details
-
setPossibleValues
Changes the set of possible values in the list- Parameters:
values
- List of items of typeT
that contains the one(s) that is(are) going to be selected. The list of values my be empty.
-
getPossibleValues
To get all the items of theList
.values - Returns:
- an enumeration of all the items.
-
addListener
Adds a listener that will listen for changes to this object- Parameters:
changeListener
- listener object
-
removeListener
Removes a listener from the list that will listen for changes to this object- Parameters:
changeListener
- listener object
-
getListeners
Returns the list of listeners that will listen for changes to this object- Returns:
- the list of listeners
-
listChanged
protected void listChanged()Alert all listeners that the list has changed -
selectionChanged
protected void selectionChanged()Alert all listeners that the selection has changed
-