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

cytoscape.data
Class SelectEvent

java.lang.Object
  extended by cytoscape.data.SelectEvent

public class SelectEvent
extends Object

Events that are fired when the selected state of a Node or Edge, or a group of Nodes or Edges, is changed.


Field Summary
static int EDGE_SET
          Static constant indicating a change to a group of Edges.
static int NODE_SET
          Static constant indicating a change to a group of Nodes.
static int SINGLE_EDGE
          Static constant indicating a change to a single Edge.
static int SINGLE_NODE
          Static constant indicating a change to a single Node.
 
Constructor Summary
SelectEvent(SelectFilter source, Object target, boolean selectOn)
          Standard constructor.
 
Method Summary
 boolean getEventType()
          Returns a boolean identifying the type of event, true the selectes state was set to true, false if it was set to false
 SelectFilter getSource()
          Returns the source of this event.
 Object getTarget()
          Returns an object reference to the target that was changed.
 int getTargetType()
          Returns a static constant identifying the type of object; either SINGLE_NODE for a Node, SINGLE_EDGE for an Edge, NODE_SET for a Set of Nodes, or EDGE_SET for a Set of Edges.
 String toString()
          Returns a String representation of this object's data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SINGLE_NODE

public static final int SINGLE_NODE
Static constant indicating a change to a single Node.

See Also:
Constant Field Values

SINGLE_EDGE

public static final int SINGLE_EDGE
Static constant indicating a change to a single Edge.

See Also:
Constant Field Values

NODE_SET

public static final int NODE_SET
Static constant indicating a change to a group of Nodes.

See Also:
Constant Field Values

EDGE_SET

public static final int EDGE_SET
Static constant indicating a change to a group of Edges.

See Also:
Constant Field Values
Constructor Detail

SelectEvent

public SelectEvent(SelectFilter source,
                   Object target,
                   boolean selectOn)
Standard constructor.

The first argument is the object that fired this event.

The second argument decribes what objects were affected; it should be of type Node, Edge, a Set of Nodes, or a Set of Edges. If the argument is a Set, it should contain at least one element. The third argument is a boolean indicating the type of event. It should be true if the change is setting the selected state to true for the target objects, or false if the change is setting it to false.

Throws:
IllegalArgumentException - if the target is null or an invalid type,
Method Detail

getSource

public SelectFilter getSource()
Returns the source of this event.


getTarget

public Object getTarget()
Returns an object reference to the target that was changed. This should be a Node, an Edge, a Set of Nodes, or a Set of Edges. The return value of getTargetType determines which of the four cases applies.


getTargetType

public int getTargetType()
Returns a static constant identifying the type of object; either SINGLE_NODE for a Node, SINGLE_EDGE for an Edge, NODE_SET for a Set of Nodes, or EDGE_SET for a Set of Edges.


getEventType

public boolean getEventType()
Returns a boolean identifying the type of event, true the selectes state was set to true, false if it was set to false


toString

public String toString()
Returns a String representation of this object's data.

Overrides:
toString in class Object

www.cytoscape.org