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
public class ListSelection<T> extends Object
A ListSelection object.
-
-
Constructor Summary
Constructors Constructor Description ListSelection(List<T> values)Creates a new ListSelection object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(ListChangeListener<T> changeListener)Adds a listener that will listen for changes to this objectList<ListChangeListener<T>>getListeners()Returns the list of listeners that will listen for changes to this objectList<T>getPossibleValues()To get all the items of theList.values protected voidlistChanged()Alert all listeners that the list has changedvoidremoveListener(ListChangeListener<T> changeListener)Removes a listener from the list that will listen for changes to this objectprotected voidselectionChanged()Alert all listeners that the selection has changedvoidsetPossibleValues(List<T> values)Changes the set of possible values in the list
-
-
-
Method Detail
-
setPossibleValues
public void setPossibleValues(List<T> values)
Changes the set of possible values in the list- Parameters:
values- List of items of typeTthat contains the one(s) that is(are) going to be selected. The list of values my be empty.
-
getPossibleValues
public List<T> getPossibleValues()
To get all the items of theList.values - Returns:
- an enumeration of all the items.
-
addListener
public void addListener(ListChangeListener<T> changeListener)
Adds a listener that will listen for changes to this object- Parameters:
changeListener- listener object
-
removeListener
public void removeListener(ListChangeListener<T> changeListener)
Removes a listener from the list that will listen for changes to this object- Parameters:
changeListener- listener object
-
getListeners
public List<ListChangeListener<T>> 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
-
-