Author: mes
Date: 2011-05-04 14:32:56 -0700 (Wed, 04 May 2011)
New Revision: 24926

Modified:
   
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/AbstractBasicLayoutTask.java
   
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/AbstractLayoutAlgorithm.java
   
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/AbstractPartitionLayoutTask.java
   
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/CyLayoutAlgorithm.java
   
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/PartitionUtil.java
   
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/internal/algorithms/GridNodeLayout.java
   
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/GroupAttributesLayout.java
   
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/StackedNodeLayout.java
   
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/bioLayout/BioLayoutFRAlgorithm.java
   
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/bioLayout/BioLayoutKKAlgorithm.java
   
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/circularLayout/CircularLayoutAlgorithm.java
   
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/AttributeCircleLayout.java
   
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/DegreeSortedCircleLayout.java
   
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/ISOMLayout.java
   
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithm.java
   
core3/layout-jgraph-impl/trunk/src/main/java/csplugins/layout/JGraphLayoutWrapper.java
   
core3/layout-prefuse-impl/trunk/src/main/java/org/cytoscape/prefuse/layouts/internal/ForceDirectedLayout.java
Log:
Added javadoc and other minor reorganization.

Modified: 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/AbstractBasicLayoutTask.java
===================================================================
--- 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/AbstractBasicLayoutTask.java
 2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/AbstractBasicLayoutTask.java
 2011-05-04 21:32:56 UTC (rev 24926)
@@ -27,14 +27,38 @@
 public abstract class AbstractBasicLayoutTask extends AbstractTask {
        
        private static final Logger logger = 
LoggerFactory.getLogger(AbstractBasicLayoutTask.class);
+       private final String name;
+       
+       /**
+        * The table column name that provides the layout algorithm name.
+        */
        protected static final String LAYOUT_ALGORITHM = "layoutAlgorithm";
 
+       /**
+        * The network view that the layout will be applied to.
+        */
        protected final CyNetworkView networkView;
+       
+       /**
+        * The set of nodes whose positions are locked and not meant to change.
+        */
+       protected final Set<View<CyNode>> staticNodes;
+       
+       /**
+        * Indicates whether to apply the layout to all nodes or only the 
selected nodes.
+        */
        protected final boolean selectedOnly;
-       protected final Set<View<CyNode>> staticNodes;
 
-       private final String name;
-
+       /**
+        * Constructor.
+        * @param networkView The network view that the layout algorithm will 
be applied to.
+        * @param name The name of the algorithm.  Used for setting attributes 
associated with 
+        * this layout.
+        * @param selectedOnly Indicates whether the layout should be applied 
to the selected nodes
+        * or not.
+        * @param staticNodes The list of nodes whose positions are meant to be 
locked and
+        * not changed.
+        */
        public AbstractBasicLayoutTask(final CyNetworkView networkView, final 
String name, boolean selectedOnly,
                          final Set<View<CyNode>> staticNodes)
        {
@@ -45,7 +69,7 @@
                this.selectedOnly = selectedOnly;
                this.staticNodes = staticNodes;
        }
-
+ 
        @Override
        public final void run(final TaskMonitor taskMonitor)  {
                final long start = System.currentTimeMillis();
@@ -75,10 +99,19 @@
                logger.debug("Layout finished: " + 
(System.currentTimeMillis()-start) + " msec.");
        }
 
-
+       /**
+        * Returns true if the specified node view is locked in place, false 
otherwise.
+        * @param v The node view to test.
+        * @return True if the specified node view is locked in place, false 
otherwise.
+        */
        protected boolean isLocked(View<CyNode> v) {
                return ((staticNodes != null) && (staticNodes.contains(v)));
        }
 
+       /**
+        * This method is designed to actually encapsulate the layout 
algorithm. It will be
+        * called from within the run() method of the task.  
+        * @param taskMonitor Provided to allow updates to the task status.
+        */
        protected abstract void doLayout(final TaskMonitor taskMonitor);
 }

Modified: 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/AbstractLayoutAlgorithm.java
===================================================================
--- 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/AbstractLayoutAlgorithm.java
 2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/AbstractLayoutAlgorithm.java
 2011-05-04 21:32:56 UTC (rev 24926)
@@ -48,86 +48,119 @@
 
 
 /**
- * The AbstractLayoutAlgorithm provides nice starting point for Layouts
- * written for Cytoscape.
+ * The AbstractLayoutAlgorithm provides a basic implementation of a layout 
TaskFactory.
  */
 abstract public class AbstractLayoutAlgorithm implements CyLayoutAlgorithm {
+       
+       /**
+        * The network view that the layout will be applied to.
+        */
        protected CyNetworkView networkView;
        
-       // Graph Objects and Views
-       protected Set<View<CyNode>> staticNodes;
+       /**
+        * The network model underlying the networkView.  This shouldn't be set 
directly
+        * by extending classes.
+        */
        protected CyNetwork network;
 
-       //
-       protected boolean selectedOnly = false;
-       protected String edgeAttribute = null;
-       protected String nodeAttribute = null;
-       protected boolean canceled = false;
-       protected Dimension currentSize = new Dimension(20, 20);
-       protected HashMap propertyMap = null;  // TODO figure out if this is 
used in a child somewhere
-       protected HashMap savedPropertyMap = null;  // TODO figure out if this 
is used in a child somewhere
+       /**
+        * The UndoSupport object use for allowing undo of layouts.
+        */
+       protected final UndoSupport undo;
 //     private ViewChangeEdit undoableEdit;
-
-       // Should definitely be overridden!
-       protected String propertyPrefix = "abstract";
-       protected UndoSupport undo;
-
+       
+       /**
+        * The set of nodes that are  
+        */
+       protected Set<View<CyNode>> staticNodes = new HashSet<View<CyNode>>();
+       
+       /**
+        * Indicates that only selected nodes should be laid out.
+        */
+       protected boolean selectedOnly;
+       
+       private final boolean supportsSelectedOnly;
+       private String edgeAttribute = null;
+       private String nodeAttribute = null;
+       private Dimension currentSize = new Dimension(20, 20);
        private final String humanName;
        private final String computerName;
 
        /**
-        * The Constructor is null
+        * The Constructor.
         */
-       public AbstractLayoutAlgorithm(UndoSupport undo, String computerName, 
String humanName) {
-               this.staticNodes = new HashSet<View<CyNode>>();
+       public AbstractLayoutAlgorithm(final UndoSupport undo, final String 
computerName, final String humanName, boolean supportsSelectedOnly) {
                this.undo = undo;
                this.computerName = computerName;
                this.humanName = humanName;
+               this.supportsSelectedOnly = supportsSelectedOnly;
        }
 
+       /**
+        * Sets the network view to be laid out.
+        * @param networkView the network view to be laid out.
+        */
        @Override
        public void setNetworkView(final CyNetworkView networkView) {
                this.networkView = networkView;
+               this.network = networkView.getModel();
+               double node_count = (double) network.getNodeCount();
+               node_count = Math.sqrt(node_count);
+               node_count *= 100;
+               currentSize = new Dimension((int) node_count, (int) node_count);
        }
+       
+       /**
+        * Set the name of the attribute to use for attribute
+        * dependent layout algorithms.
+        *
+        * @param attributeName The name of the attribute
+        */
+       public void setLayoutAttribute(String attributeName) {
+               if (supportsNodeAttributes().size() > 0) {
+                       nodeAttribute = attributeName;
+               } else if (supportsEdgeAttributes().size() > 0) {
+                       edgeAttribute = attributeName;
+               }
+       }
+       
+       /**
+        * Set the flag that indicates that this algorithm
+        * should only operate on the currently selected nodes.
+        *
+        * @param selectedOnly set to "true" if the algorithm should
+        * only apply to selected nodes only
+        */
+       public void setSelectedOnly(boolean selectedOnly) {
+               this.selectedOnly = selectedOnly;
+       }
 
        /**
-        * getName is used to construct property strings
-        * for this layout.
+        * A computer readable name used to construct property strings.
         */
        public String getName() {
                return computerName;
        }
 
        /**
-        * toString is used to get the user-visible name
-        * of the layout
+        * Used to get the user-visible name of the layout.
         */
        public String toString() {
                return humanName;
        }
 
        /**
-        * These methods should be overridden
+        * Indicates whether this algorithm supports applying the layout 
+        * only to selected nodes.
         */
-       public boolean supportsSelectedOnly() {
-               return false;
+       public final boolean supportsSelectedOnly() {
+               return supportsSelectedOnly;
        }
 
        /**
-        * Set the flag that indicates that this algorithm
-        * should only operate on the currently selected nodes.
-        *
-        * @param selectedOnly set to "true" if the algorithm should
-        * only apply to selected nodes only
-        */
-       public void setSelectedOnly(boolean selectedOnly) {
-               this.selectedOnly = selectedOnly;
-       }
-
-       /**
         * Returns the types of node attributes supported by
-        * this algorithm.  This should be overloaded by the
-        * specific algorithm
+        * this algorithm.  This should be overridden by the
+        * specific algorithm.
         *
         * @return the list of supported attribute types, or null
         * if node attributes are not supported
@@ -138,8 +171,8 @@
 
        /**
         * Returns the types of edge attributes supported by
-        * this algorithm.  This should be overloaded by the
-        * specific algorithm
+        * this algorithm.  This should be overridden by the
+        * specific algorithm.
         *
         * @return the list of supported attribute types, or null
         * if edge attributes are not supported
@@ -149,24 +182,6 @@
        }
 
        /**
-        * Set the name of the attribute to use for attribute
-        * dependent layout algorithms.
-        *
-        * @param attributeName The name of the attribute
-        */
-       public void setLayoutAttribute(String attributeName) {
-               if (supportsNodeAttributes().size() > 0) {
-                       nodeAttribute = attributeName;
-               } else if (supportsEdgeAttributes().size() > 0) {
-                       edgeAttribute = attributeName;
-               }
-       }
-
-       /*
-        * Override this if you want to provide a custom attribute
-        */
-
-       /**
         * This returns the list of "attributes" that are provided
         * by an algorithm for internal purposes.  For example,
         * an edge-weighted algorithmn might seed the list of
@@ -179,31 +194,8 @@
                return new ArrayList<String>();
        }
 
-       /**
-        * Initializer, calls <tt>intialize_local</tt> to
-        * start construction process.
-        */
-       public void initialize() {
-               double node_count = (double) network.getNodeCount();
-               node_count = Math.sqrt(node_count);
-               node_count *= 100;
-               currentSize = new Dimension((int) node_count, (int) node_count);
-               initialize_local();
-       }
-
-       /**
-        * Initializes all local information, and is called immediately
-        * within the <tt>initialize()</tt> process.
-        * The user is responsible for overriding this method
-        * to do any construction that may be necessary:
-        * for example, to initialize local per-edge or
-        * graph-wide data.
-        */
-       protected void initialize_local() {
-       }
-
        /** 
-        * Descendents need to call this if they intend to use the 
"staticNodes" field.
+        * Descendants need to call this if they intend to use the 
"staticNodes" field.
         */
        public final void initStaticNodes() {
                staticNodes.clear();

Modified: 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/AbstractPartitionLayoutTask.java
===================================================================
--- 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/AbstractPartitionLayoutTask.java
     2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/AbstractPartitionLayoutTask.java
     2011-05-04 21:32:56 UTC (rev 24926)
@@ -10,6 +10,8 @@
 import org.cytoscape.view.model.CyNetworkView;
 import org.cytoscape.view.model.View;
 import org.cytoscape.work.TaskMonitor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  *  This is a more helpful implementation of a LayoutAlgorithm Task 
@@ -20,24 +22,52 @@
  *  method as an argument.
  */
 public abstract class AbstractPartitionLayoutTask extends 
AbstractBasicLayoutTask {
+       
+       private static Logger logger = 
LoggerFactory.getLogger(AbstractPartitionLayoutTask.class);
+       
+       /**
+        * The TaskMonitor initially set in the run method of the task. 
+        * Used to track the layout progress.
+        */
        protected TaskMonitor taskMonitor;
 
-       double incr = 100;
+       /**
+        * The value used for spacing nodes.  Defaults to 100.
+        */
+       protected double incr = 100;
+       
+       /**
+        * The list of LayoutPartition objects that get laid out.
+        */
        protected List <LayoutPartition> partitionList = null;
+       
+       /**
+        * The EdgeWeighter used for edge weight calculations.
+        */
        protected EdgeWeighter edgeWeighter = null;
-       private boolean singlePartition;
+       
+       private final boolean singlePartition;
 
-       // Information for taskMonitor
-       double current_start = 0;       // Starting node number
-       double  current_size = 0;               // Partition size
-       double  total_nodes = 0;                // Total number of nodes
+       /**
+        * Starting node number used for taskMonitor.
+        */
+       protected double current_start = 0;
+       
+       /**
+        * Partition size used for taskMonitor.
+        */
+       protected double current_size = 0;
+       
+       /**
+        * Total number of nodes used for taskMonitor.
+        */
+       protected double total_nodes = 0;
 
        /**
         * Creates a new AbstractPartitionLayoutTask object.
         */
        public AbstractPartitionLayoutTask(final CyNetworkView networkView, 
final String name,
-                                     final boolean singlePartition,
-                                     final boolean selectedOnly, final 
Set<View<CyNode>> staticNodes) {
+                                     final boolean singlePartition, final 
boolean selectedOnly, final Set<View<CyNode>> staticNodes) {
                super(networkView, name, selectedOnly, staticNodes);
                this.singlePartition = singlePartition;
        }
@@ -51,44 +81,25 @@
        public abstract void layoutPartion(LayoutPartition partition);
 
        /**
-        *  DOCUMENT ME!
+        * Returns true if the layout supports only applying the layout to 
selected nodes.
         *
-        * @return  DOCUMENT ME!
+        * @return True if the layout supports only applying the layout to 
selected nodes.
         */
        public boolean supportsSelectedOnly() {
                return true;
        }
 
        /**
-        * Sets the singlePartition flag, which disables partitioning. This
-        * can be used by users who do not want to partition their graph for
-        * some reason.
+        * Used for 
         *
-        * @param partitioning if false, no paritioning will be done
+        * @param percent The percentage of completion for this partition. 
Value must be between 0 and 100.
         */
-       public void setPartition(final boolean partitioning) {
-               singlePartition = !partitioning;
-       }
-
-       /**
-        * Sets the singlePartition flag, which disables partitioning. This
-        * can be used by users who do not want to partition their graph for
-        * some reason.
-        *
-        * @param value if "false", no paritioning will be done
-        */
-       public void setPartition(String value) {
-               Boolean val = new Boolean(value);
-               setPartition(val.booleanValue());
-       }
-
-       /**
-        *  DOCUMENT ME!
-        *
-        * @param percent The percentage of completion for this partition
-        */
        protected void setTaskStatus(int percent) {
                if (taskMonitor != null) {
+                       if ( percent < 0 || percent > 100 ) {
+                               logger.warn("invalid percent value set for 
layout status (must be between 0 and 100): " + percent);
+                               return;
+                       }       
                        // Calculate the nodes done for this partition
                        double nodesDone = current_size*(double)percent/100.;
                        // Calculate the percent done overall
@@ -99,8 +110,11 @@
        }
 
        /**
-        * AbstractGraphPartitionLayout implements the constuct method
-        * and calls layoutPartion for each partition.
+        * AbstractGraphPartitionLayout implements the doLayout method
+        * of AbstractBasicLayout in which it calls the layoutParition
+        * method on each LayoutPartition object created for the network.
+        * @param taskMonitor the TaskMonitor provided by the run() method
+        * of the Task.
         */
        public void doLayout(final TaskMonitor taskMonitor) {
                final CyNetwork network = networkView.getModel();

Modified: 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/CyLayoutAlgorithm.java
===================================================================
--- 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/CyLayoutAlgorithm.java
       2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/CyLayoutAlgorithm.java
       2011-05-04 21:32:56 UTC (rev 24926)
@@ -40,7 +40,9 @@
 import java.util.List;
 import java.util.Set;
 
-
+/**
+ * An extension of NetworkViewTaskFactory specific to layout algorithms.
+ */
 public interface CyLayoutAlgorithm extends NetworkViewTaskFactory {
        /**
         * Tests to see if this layout supports doing a layout on a subset of 
the

Modified: 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/PartitionUtil.java
===================================================================
--- 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/PartitionUtil.java
   2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/PartitionUtil.java
   2011-05-04 21:32:56 UTC (rev 24926)
@@ -58,8 +58,6 @@
 
 /**
  * This class also provides static methods that are used to partition a 
network. 
- *
- * @author <a href="mailto:[email protected]";>Scooter Morris</a>
  */
 public final class PartitionUtil {
 

Modified: 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/internal/algorithms/GridNodeLayout.java
===================================================================
--- 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/internal/algorithms/GridNodeLayout.java
      2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-api/trunk/src/main/java/org/cytoscape/view/layout/internal/algorithms/GridNodeLayout.java
      2011-05-04 21:32:56 UTC (rev 24926)
@@ -63,7 +63,7 @@
         * Creates a new GridNodeLayout object.
         */
        public GridNodeLayout(UndoSupport un) {
-               super(un,CyLayoutAlgorithmManager.DEFAULT_LAYOUT_NAME,"Grid 
Layout");
+               super(un,CyLayoutAlgorithmManager.DEFAULT_LAYOUT_NAME,"Grid 
Layout", true);
        }
 
        public boolean tunablesAreValid(final Appendable errMsg) {
@@ -86,13 +86,4 @@
                return new TaskIterator(new GridNodeLayoutTask(networkView, 
getName(), selectedOnly, staticNodes,
                                                               
nodeVerticalSpacing, nodeHorizontalSpacing));
        }
-
-       /**
-        * We do support selected only
-        *
-        * @return true
-        */
-       public boolean supportsSelectedOnly() {
-               return true;
-       }
 }

Modified: 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/GroupAttributesLayout.java
===================================================================
--- 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/GroupAttributesLayout.java
      2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/GroupAttributesLayout.java
      2011-05-04 21:32:56 UTC (rev 24926)
@@ -85,7 +85,7 @@
         * Creates a new GroupAttributesLayout object.
         */
        public GroupAttributesLayout(UndoSupport undoSupport, CyTableManager 
tableMgr) {
-               super(undoSupport, "attributes-layout", "Group Attributes 
Layout");
+               super(undoSupport, "attributes-layout", "Group Attributes 
Layout", true);
                this.tableMgr = tableMgr;
        }
 

Modified: 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/StackedNodeLayout.java
===================================================================
--- 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/StackedNodeLayout.java
  2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/StackedNodeLayout.java
  2011-05-04 21:32:56 UTC (rev 24926)
@@ -68,7 +68,7 @@
         * @param nodes  DOCUMENT ME!
         */
        public StackedNodeLayout(UndoSupport undoSupport) {
-               super(undoSupport, "stacked-node-layout", "Stacked Node 
Layout");
+               super(undoSupport, "stacked-node-layout", "Stacked Node 
Layout", true);
        }
 
        public TaskIterator getTaskIterator() {

Modified: 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/bioLayout/BioLayoutFRAlgorithm.java
===================================================================
--- 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/bioLayout/BioLayoutFRAlgorithm.java
     2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/bioLayout/BioLayoutFRAlgorithm.java
     2011-05-04 21:32:56 UTC (rev 24926)
@@ -1,5 +1,4 @@
 /**
- * Copyright (c) 2006 The Regents of the University of California.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -122,7 +121,7 @@
         */
        public BioLayoutFRAlgorithm(UndoSupport undoSupport, boolean 
supportEdgeWeights) {
                
-               super(undoSupport, "fruchterman-rheingold", (supportEdgeWeights 
?  "Edge-weighted Force directed (BioLayout)" : "Force directed (BioLayout)"));
+               super(undoSupport, "fruchterman-rheingold", (supportEdgeWeights 
?  "Edge-weighted Force directed (BioLayout)" : "Force directed (BioLayout)"), 
true);
 
                supportWeights = supportEdgeWeights;
 

Modified: 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/bioLayout/BioLayoutKKAlgorithm.java
===================================================================
--- 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/bioLayout/BioLayoutKKAlgorithm.java
     2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/bioLayout/BioLayoutKKAlgorithm.java
     2011-05-04 21:32:56 UTC (rev 24926)
@@ -82,7 +82,8 @@
 
        public BioLayoutKKAlgorithm(UndoSupport un, boolean supportEdgeWeights) 
{
                super(un, (supportEdgeWeights ?  "kamada-kawai" : 
"kamada-kawai-noweight"),
-                         (supportEdgeWeights ?  "Edge-weighted Spring 
Embedded" : "Spring Embedded") );
+                         (supportEdgeWeights ?  "Edge-weighted Spring 
Embedded" : "Spring Embedded"),
+                         true);
                supportWeights = supportEdgeWeights;
        }
 

Modified: 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/circularLayout/CircularLayoutAlgorithm.java
===================================================================
--- 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/circularLayout/CircularLayoutAlgorithm.java
     2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/circularLayout/CircularLayoutAlgorithm.java
     2011-05-04 21:32:56 UTC (rev 24926)
@@ -31,7 +31,7 @@
         * Creates a new Layout object.
         */
        public CircularLayoutAlgorithm(UndoSupport un) {
-               super(un, "circular", "Circular Layout");
+               super(un, "circular", "Circular Layout", false);
        }
 
        //TODO how to validate these values?
@@ -46,13 +46,4 @@
                                                        nodeVerticalSpacing, 
leftEdge, topEdge,
                                                        rightMargin, 
singlePartition));
        }
-
-       /**
-        *  DOCUMENT ME!
-        *
-        * @return  DOCUMENT ME!
-        */
-       public boolean supportsSelectedOnly() {
-               return false;
-       }
 }

Modified: 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/AttributeCircleLayout.java
===================================================================
--- 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/AttributeCircleLayout.java
       2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/AttributeCircleLayout.java
       2011-05-04 21:32:56 UTC (rev 24926)
@@ -68,7 +68,8 @@
        public AttributeCircleLayout(final UndoSupport undoSupport, final 
boolean supportNodeAttributes)
        {
                super(undoSupport, (supportNodeAttributes ? "attribute-circle": 
"circle"), 
-                                  (supportNodeAttributes ? "Attribute Circle 
Layout" : "Circle Layout") );
+                                  (supportNodeAttributes ? "Attribute Circle 
Layout" : "Circle Layout"),
+                                  true);
                this.supportNodeAttributes = supportNodeAttributes;
        }
 

Modified: 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/DegreeSortedCircleLayout.java
===================================================================
--- 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/DegreeSortedCircleLayout.java
    2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/DegreeSortedCircleLayout.java
    2011-05-04 21:32:56 UTC (rev 24926)
@@ -31,7 +31,7 @@
         * Creates a new DegreeSortedCircleLayout object.
         */
        public DegreeSortedCircleLayout(UndoSupport undoSupport, CyTableManager 
tableMgr) {
-               super(undoSupport, "degree-circle", "Degree Sorted Circle 
Layout");
+               super(undoSupport, "degree-circle", "Degree Sorted Circle 
Layout", true);
                this.tableMgr = tableMgr;
        }
 

Modified: 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/ISOMLayout.java
===================================================================
--- 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/ISOMLayout.java
  2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/graphPartition/ISOMLayout.java
  2011-05-04 21:32:56 UTC (rev 24926)
@@ -39,7 +39,7 @@
         * Creates a new ISOMLayout object.
         */
        public ISOMLayout(UndoSupport undoSupport) {
-               super(undoSupport,"isom", "Inverted Self-Organizing Map 
Layout");
+               super(undoSupport,"isom", "Inverted Self-Organizing Map 
Layout", true);
        }
 
        // TODO
@@ -57,13 +57,4 @@
                                           initialAdaptation, minAdaptation, 
sizeFactor,
                                           coolingFactor, singlePartition));
        }
-       
-       /**
-        * We do support selected only
-        *
-        * @return true
-        */
-       public boolean supportsSelectedOnly() {
-               return true;
-       }
 }

Modified: 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithm.java
===================================================================
--- 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithm.java
     2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-cytoscape-impl/trunk/src/main/java/csplugins/layout/algorithms/hierarchicalLayout/HierarchicalLayoutAlgorithm.java
     2011-05-04 21:32:56 UTC (rev 24926)
@@ -92,7 +92,7 @@
         * Creates a new HierarchicalLayoutAlgorithm object.
         */
        public HierarchicalLayoutAlgorithm(UndoSupport undoSupport) {
-               super(undoSupport, "hierarchical", "Hierarchical Layout");
+               super(undoSupport, "hierarchical", "Hierarchical Layout",true);
        }
 
        // TODO
@@ -107,10 +107,4 @@
                                nodeHorizontalSpacing, nodeVerticalSpacing, 
componentSpacing, bandGap,leftEdge, topEdge,
                                rightMargin, selected_only));
        }
-       
-       // We do support selected only
-       @Override
-       public boolean supportsSelectedOnly() {
-               return true;
-       }
 }

Modified: 
core3/layout-jgraph-impl/trunk/src/main/java/csplugins/layout/JGraphLayoutWrapper.java
===================================================================
--- 
core3/layout-jgraph-impl/trunk/src/main/java/csplugins/layout/JGraphLayoutWrapper.java
      2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-jgraph-impl/trunk/src/main/java/csplugins/layout/JGraphLayoutWrapper.java
      2011-05-04 21:32:56 UTC (rev 24926)
@@ -35,7 +35,7 @@
         */
        public JGraphLayoutWrapper(UndoSupport un, int layout_type) {
                // names here will be overridden by provided methods
-               super(un, "jgraph", "jgraph");
+               super(un, "jgraph", "jgraph", true);
                
                this.layout_type = layout_type;
 
@@ -164,13 +164,4 @@
 
                return "";
        }
-
-       /**
-        * We do support selected only
-        *
-        * @return true
-        */
-       public boolean supportsSelectedOnly() {
-               return true;
-       }
 }

Modified: 
core3/layout-prefuse-impl/trunk/src/main/java/org/cytoscape/prefuse/layouts/internal/ForceDirectedLayout.java
===================================================================
--- 
core3/layout-prefuse-impl/trunk/src/main/java/org/cytoscape/prefuse/layouts/internal/ForceDirectedLayout.java
       2011-05-04 21:27:32 UTC (rev 24925)
+++ 
core3/layout-prefuse-impl/trunk/src/main/java/org/cytoscape/prefuse/layouts/internal/ForceDirectedLayout.java
       2011-05-04 21:32:56 UTC (rev 24926)
@@ -51,7 +51,7 @@
         * Creates a new GridNodeLayout object.
         */
        public ForceDirectedLayout(UndoSupport un) {
-               super(un, "force-directed", "Force Directed Layout");
+               super(un, "force-directed", "Force Directed Layout", true);
        }
 
        public boolean tunablesAreValid(final Appendable errMsg) {
@@ -74,13 +74,4 @@
                                                    defaultSpringLength, 
defaultNodeMass, integrator,
                                                    singlePartition));
        }
-
-       /**
-        * We do support selected only
-        *
-        * @return true
-        */
-       public boolean supportsSelectedOnly() {
-               return true;
-       }
 }

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to