Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.view
Class FlagAndSelectionHandler

java.lang.Object
  extended by cytoscape.view.FlagAndSelectionHandler
All Implemented Interfaces:
SelectEventListener, GraphViewChangeListener, EventListener

public class FlagAndSelectionHandler
extends Object
implements SelectEventListener, GraphViewChangeListener

This class synchronizes the flagged status of nodes and edges as held by a SelectFilter object of a network with the selection status of the corresponding node and edge views in a GraphView. An object will be selected in the view iff the matching object is flagged in the SelectFilter. This class is only used by PhoebeNetworkView, which no longer used anywhere.


Constructor Summary
FlagAndSelectionHandler(SelectFilter selectFilter, GraphView view)
          Standard constructor takes the flag filter and the view that should be synchronized.
 
Method Summary
 void graphViewChanged(GraphViewChangeEvent event)
          Responds to selection events from the view by setting the matching flagged state in the SelectFilter object.
 void onSelectEvent(SelectEvent event)
          Responds to events indicating a change in the flagged state of one or more nodes or edges.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlagAndSelectionHandler

public FlagAndSelectionHandler(SelectFilter selectFilter,
                               GraphView view)
Standard constructor takes the flag filter and the view that should be synchronized. On construction, this object will synchronize the filter and view by turning on flags or selections that are currently on in one of the two objects.

Method Detail

graphViewChanged

public void graphViewChanged(GraphViewChangeEvent event)
Responds to selection events from the view by setting the matching flagged state in the SelectFilter object.

Specified by:
graphViewChanged in interface GraphViewChangeListener

onSelectEvent

public void onSelectEvent(SelectEvent event)
Responds to events indicating a change in the flagged state of one or more nodes or edges. Sets the corresponding selection state for views of those objects in the graph view.

Specified by:
onSelectEvent in interface SelectEventListener

www.cytoscape.org