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

cytoscape.view
Class FlagAndSelectionHandler

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

public class FlagAndSelectionHandler
extends Object
implements FlagEventListener, GraphViewChangeListener

This class synchronizes the flagged status of nodes and edges as held by a FlagFilter 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 FlagFilter. This class is only used by PhoebeNetworkView, which no longer used anywhere.


Constructor Summary
FlagAndSelectionHandler(FlagFilter flagFilter, 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 FlagFilter object.
 void onFlagEvent(FlagEvent 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(FlagFilter flagFilter,
                               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 FlagFilter object.

Specified by:
graphViewChanged in interface GraphViewChangeListener

onFlagEvent

public void onFlagEvent(FlagEvent 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:
onFlagEvent in interface FlagEventListener

www.cytoscape.org