cytoscape.foo
Class GraphConverter

java.lang.Object
  extended by cytoscape.foo.GraphConverter

Deprecated. Please avoid looking at or using this code -- this code is going away in the next Cytoscape release (the one after 2.1).

public final class GraphConverter
extends Object

VERY STRONG WARNING!!! AVOID USING OR LOOKING AT THIS CODE!! IT IS GOING TO GO AWAY VERY SOON!!! This class is very temporary. It is in heavy flux until some other APIs which are not part of core Cytoscape are finalized. And yes, this class does belong in the core. It's not a plugin, I feel.


Method Summary
static cytoscape.graph.legacy.layout.algorithm.MutablePolyEdgeGraphLayout getGraphCopy(double percentBorder, boolean preserveEdgeAnchors, boolean onlySelectedNodesMovable)
          Deprecated. Returns a representation of Cytoscape's current network view.
static cytoscape.graph.legacy.layout.algorithm.MutablePolyEdgeGraphLayout getGraphReference(double percentBorder, boolean preserveEdgeAnchors, boolean onlySelectedNodesMovable)
          Deprecated. Returns a representation of Cytoscape's current network view.
static void updateCytoscapeLayout(cytoscape.graph.legacy.layout.algorithm.MutablePolyEdgeGraphLayout layout)
          Deprecated. layout must be an object previously returned by GraphConverter.getGraphCopy().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getGraphCopy

public static cytoscape.graph.legacy.layout.algorithm.MutablePolyEdgeGraphLayout getGraphCopy(double percentBorder,
                                                                                              boolean preserveEdgeAnchors,
                                                                                              boolean onlySelectedNodesMovable)
Deprecated. 
Returns a representation of Cytoscape's current network view. Returns a MutablePolyEdgeGraphLayout which, when mutated, has no effect on the underlying Cytoscape network view. Use the return value of this method when moving positions of nodes in a thread that is not the AWT dispatch thread. Use updateCytoscapeLayout(), passing as an argument the return value of getGraphCopy(), to move nodes (and edge anchor points) in the underlying Cytoscape network view. getMaxWidth() of the return object is ... All distances are preserved from to Cytoscape graph to the return object.


updateCytoscapeLayout

public static void updateCytoscapeLayout(cytoscape.graph.legacy.layout.algorithm.MutablePolyEdgeGraphLayout layout)
Deprecated. 
layout must be an object previously returned by GraphConverter.getGraphCopy(). During the time that passes between setting layout as the return value of getGraphCopy() and calling this method with the same layout, Cytoscape's current network view topology cannot change, otherwise this method will barf.

Throws:
IllegalArgumentException - if layout is not a value that was previously returned by getGraphCopy().

getGraphReference

public static cytoscape.graph.legacy.layout.algorithm.MutablePolyEdgeGraphLayout getGraphReference(double percentBorder,
                                                                                                   boolean preserveEdgeAnchors,
                                                                                                   boolean onlySelectedNodesMovable)
Deprecated. 
Returns a representation of Cytoscape's current network view. Returns a MutableGraphLayout, which, when mutated, has a direct effect on the underlying Cytoscape network view. You'd sure as heck better'd be using the returned object from the AWT event dispatch thread! Better yet, lock the Cytoscape desktop somehow (with a modal dialog for example) while using this returned object. Movable nodes are defined to be selected nodes in Cytoscape - if no nodes are selected then all nodes are movable. If selected node information changes while we have a reference to this return object, then the movability of corresponding node also changes. This is one reason why it's important to "lock" the Cytoscape desktop while operating on this return object.