|
Cytoscape 2.4.1 (c) 2006,2007 ISB, MSKCC, UCSD | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcytoscape.data.FlagFilter
SelectFilter
public class FlagFilter
This class implements the ability to attach a flag to every node or edge in a GraphPerspective. The flag can be either on or off. Methods are provided for inspecting the current state of any graph object, for setting the state, or getting the full set of currently flagged nodes or edges. This functionality is often used to identify a set of interesting nodes or edges in the graph.
A non-null GraphPerspective reference is required to construct an instance of this class. This class will listen to the graph to respond to the removal of graph objects. A currently flagged object that is removed from the graph will lose its flag, even if it is later added back to the graph.
When the state of a node or edge is changed, a event of type FlagEvent is fired. When a group of nodes or edges are changed together in a single operation, one event will be fired for the whole group (but separate events for nodes and edges). Note: a listener should not be removed from this object in response to the firing of an event, as this may cause a ConcurrentModificationException.
WARNING: for performance reasons, the set of objects returned by the getSelectedXX methods is the actual data object, not a copy. Users should not directly modify these sets.
Performance note: the implementation is a HashSet of flagged objects, so most methods are O(1). Operations on groups of nodes are O(N) where N is either the number of flagged objects or the number of objects in the graph, as applicable.
Constructor Summary | |
---|---|
FlagFilter(GraphPerspective graph)
Deprecated. Standard Constructor. |
|
FlagFilter(SelectFilter selectFilter)
Deprecated. Constructor added so that FlagFilter can be properly deprecated |
Method Summary | |
---|---|
void |
addFlagEventListener(FlagEventListener listener)
Deprecated. If the argument is not already a listener to this object, it is added. |
Set |
flagAllEdges()
Deprecated. Sets the flagged state to true for all Edges in the GraphPerspective. |
Set |
flagAllNodes()
Deprecated. Sets the flagged state to true for all Nodes in the GraphPerspective. |
List |
getFlagEventListeners()
Deprecated. Gets a List of All Registered Listeners. |
Set |
getFlaggedEdges()
Deprecated. Returns the set of all flagged edges in the referenced GraphPespective. |
Set |
getFlaggedNodes()
Deprecated. Returns the set of all flagged nodes in the referenced GraphPespective. |
void |
graphPerspectiveChanged(GraphPerspectiveChangeEvent event)
Deprecated. Implementation of the GraphPerspectiveChangeListener interface. |
boolean |
isFlagged(Edge edge)
Deprecated. Returns true if the argument is a flagged Edge in the referenced GraphPerspective, false otherwise. |
boolean |
isFlagged(Node node)
Deprecated. Returns true if the argument is a flagged Node in the referenced GraphPerspective, false otherwise. |
boolean |
passesFilter(Object o)
Deprecated. Implementation of the Filter interface. |
void |
removeFlagEventListener(FlagEventListener listener)
Deprecated. If the argument is a listener to this object, removes it from the list of listeners. |
boolean |
setFlagged(Edge edge,
boolean newState)
Deprecated. If the first argument is an Edge in the referenced GraphPerspective, sets its flagged state to the value of the second argument. |
boolean |
setFlagged(Node node,
boolean newState)
Deprecated. If the first argument is a Node in the referenced GraphPerspective, sets its flagged state to the value of the second argument. |
Set |
setFlaggedEdges(Collection edgesToSet,
boolean newState)
Deprecated. Sets the flagged state defined by the second argument for all Edges contained in the first argument, which should be a Collection of Edge objects contained in the referenced GraphPerspective. |
Set |
setFlaggedNodes(Collection nodesToSet,
boolean newState)
Deprecated. Sets the flagged state defined by the second argument for all Nodes contained in the first argument, which should be a Collection of Node objects contained in the referenced GraphPerspective. |
Set |
unflagAllEdges()
Deprecated. Sets the flagged state to false for all Edges in the GraphPerspective. |
Set |
unflagAllNodes()
Deprecated. Sets the flagged state to false for all Nodes in the GraphPerspective. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FlagFilter(GraphPerspective graph)
NullPointerException
- if the argument is null.public FlagFilter(SelectFilter selectFilter)
selectFilter
- the SelectFilter that performs all the methods in this FlagFilterMethod Detail |
---|
public Set getFlaggedNodes()
WARNING: the returned set is the actual data object, not a copy. Don't directly modify this set.
public Set getFlaggedEdges()
WARNING: the returned set is the actual data object, not a copy. Don't directly modify this set.
public boolean isFlagged(Node node)
public boolean isFlagged(Edge edge)
public boolean passesFilter(Object o)
passesFilter
in interface Filter
public boolean setFlagged(Node node, boolean newState)
public boolean setFlagged(Edge edge, boolean newState)
public Set setFlaggedNodes(Collection nodesToSet, boolean newState)
ClassCastException
- if the first argument contains objects other
than giny.model.Node objectspublic Set setFlaggedEdges(Collection edgesToSet, boolean newState)
ClassCastException
- if the first argument contains objects other
than giny.model.Edge objectspublic Set flagAllNodes()
public Set flagAllEdges()
public Set unflagAllNodes()
public Set unflagAllEdges()
public void graphPerspectiveChanged(GraphPerspectiveChangeEvent event)
graphPerspectiveChanged
in interface GraphPerspectiveChangeListener
public void addFlagEventListener(FlagEventListener listener)
public void removeFlagEventListener(FlagEventListener listener)
public List getFlagEventListeners()
|
www.cytoscape.org | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |