Class MultiPickedState<T>
java.lang.Object
edu.uci.ics.jung.visualization.picking.AbstractPickedState<T>
edu.uci.ics.jung.visualization.picking.MultiPickedState<T>
- All Implemented Interfaces:
PickedInfo<T>
,PickedState<T>
,ItemSelectable
Maintains the state of what has been 'picked' in the graph.
The
Sets
are constructed so that their iterators
will traverse them in the order in which they are picked.-
Field Summary
FieldsFields inherited from class edu.uci.ics.jung.visualization.picking.AbstractPickedState
listenerList
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class edu.uci.ics.jung.visualization.picking.AbstractPickedState
addItemListener, fireItemStateChanged, removeItemListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.ItemSelectable
addItemListener, removeItemListener
-
Field Details
-
picked
the 'picked' vertices
-
-
Constructor Details
-
MultiPickedState
public MultiPickedState()
-
-
Method Details
-
pick
Description copied from interface:PickedState
Marksv
as "picked" ifb == true
, and unmarksv
as picked ifb == false
.- Specified by:
pick
in interfacePickedState<T>
- Parameters:
v
- the element to be picked/unpickedstate
- true ifv
is to be marked as picked, false if to be marked as unpicked- Returns:
- the "picked" state of
v
prior to this call
-
clear
public void clear()Description copied from interface:PickedState
Clears the "picked" state from all elements.- Specified by:
clear
in interfacePickedState<T>
-
getPicked
- Specified by:
getPicked
in interfacePickedState<T>
- Returns:
- all "picked" elements.
-
isPicked
- Specified by:
isPicked
in interfacePickedInfo<T>
- Specified by:
isPicked
in interfacePickedState<T>
- Returns:
true
ifv
is currently "picked".
-
getSelectedObjects
for the ItemSelectable interface contract- Specified by:
getSelectedObjects
in interfaceItemSelectable
-