Author: ghuck
Date: 2010-07-16 08:58:11 -0700 (Fri, 16 Jul 2010)
New Revision: 20947
Modified:
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/EdgeWeighter.java
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutEdge.java
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutLabelNodeImpl.java
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutLabelPartition.java
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutNode.java
Log:
Modified:
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/EdgeWeighter.java
===================================================================
---
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/EdgeWeighter.java
2010-07-16 15:57:52 UTC (rev 20946)
+++
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/EdgeWeighter.java
2010-07-16 15:58:11 UTC (rev 20947)
@@ -30,6 +30,11 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
+
+/**
+* Copyright (C) Gerardo Huck, 2010
+*/
+
package csplugins.layout;
import java.lang.Math;
@@ -209,7 +214,7 @@
*
*/
public void setWeightLabelEdge(LayoutEdge layoutEdge) {
- logger.info("Setting weight for label edge: "+layoutEdge+" using "+
weightAttribute);
+ // logger.info("Setting weight for label edge: "+layoutEdge+"
using "+ weightAttribute);
double eValue = labelWeightCoefficient * maxWeightSnapshot;
@@ -238,7 +243,7 @@
double eValue = 0.5;
// logger.debug("Setting weight for "+layoutEdge+" using
"+weightAttribute);
- logger.info("Setting weight for "+layoutEdge+" using "+weightAttribute);
+ // logger.info("Setting weight for "+layoutEdge+" using
"+weightAttribute);
if ((weightAttribute != null)
&& edgeAttributes.hasAttribute(edge.getIdentifier(),
weightAttribute)) {
Modified:
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutEdge.java
===================================================================
---
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutEdge.java
2010-07-16 15:57:52 UTC (rev 20946)
+++
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutEdge.java
2010-07-16 15:58:11 UTC (rev 20947)
@@ -30,6 +30,11 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
+
+/**
+* Copyright (C) Gerardo Huck, 2010
+*/
+
package csplugins.layout;
import csplugins.layout.LayoutNode;
Modified:
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutLabelNodeImpl.java
===================================================================
---
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutLabelNodeImpl.java
2010-07-16 15:57:52 UTC (rev 20946)
+++
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutLabelNodeImpl.java
2010-07-16 15:58:11 UTC (rev 20947)
@@ -1,7 +1,34 @@
+/**
+* Copyright (C) Gerardo Huck, 2010
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+
+/**
+ * This class represents the fake nodes used to layout labels.
+ *
+ * It was done as part of Google Summer of Code 2010.
+ * Mentor: Mike Smoot
+ * @author <a href="mailto:gerardohuck .at. gmail .dot. com">Gerardo Huck</a>
+ * @version 0.1
+ */
+
package csplugins.layout;
import cytoscape.*;
-//import cytoscape.visual.LabelPosition;
import cytoscape.logger.CyLogger;
import cytoscape.data.CyAttributes;
import cytoscape.view.*;
@@ -28,7 +55,6 @@
protected NodeView parentNodeView;
protected ObjectPosition lp;
protected CyAttributes nodeAtts = null;
- // protected ObjectPosition labelPosition;
/**
* Empty constructor
@@ -52,21 +78,23 @@
if (labelPosition == null) {
lp = new ObjectPositionImpl();
+ // logger.info("Created new ObjectPosition!");
} else {
ValueParser<ObjectPosition> parser =
(ValueParser<ObjectPosition>)
VisualPropertyType.NODE_LABEL_POSITION.getValueParser();
lp = parser.parseStringValue(labelPosition);
+ // logger.info("ObjectPosition succesfully parsed!");
}
- logger.info("Parent node: " + parentNodeView.getNode().getIdentifier());
- logger.info("Offset = " + lp.getOffsetX() + ", " + lp.getOffsetY() );
+// logger.info("Parent node: " + parentNodeView.getNode().getIdentifier());
+// logger.info("Offset = " + lp.getOffsetX() + ", " + lp.getOffsetY() );
this.setX(lp.getOffsetX() + parentNodeView.getXPosition());
this.setY(lp.getOffsetY() + parentNodeView.getYPosition());
this.neighbors = new ArrayList<LayoutNode>();
this.index = index;
- logger.info("Created " + this.getIdentifier() + "placed in: " +
this.getX() + ", " + this.getY() );
+ // logger.info("Created " + this.getIdentifier() + "placed in: " +
this.getX() + ", " + this.getY() );
}
/**
Modified:
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutLabelPartition.java
===================================================================
---
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutLabelPartition.java
2010-07-16 15:57:52 UTC (rev 20946)
+++
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutLabelPartition.java
2010-07-16 15:58:11 UTC (rev 20947)
@@ -1,3 +1,32 @@
+/**
+* Copyright (C) Gerardo Huck, 2010
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+
+/**
+ * This handles the creation and behavior of a "partition" used to layout
labels
+ * as well as nodes.
+ *
+ * It was done as part of Google Summer of Code 2010.
+ * Mentor: Mike Smoot
+ * @author <a href="mailto:gerardohuck .at. gmail .dot. com">Gerardo Huck</a>
+ * @version 0.1
+ */
+
package csplugins.layout;
import cytoscape.logger.CyLogger;
Modified:
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutNode.java
===================================================================
---
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutNode.java
2010-07-16 15:57:52 UTC (rev 20946)
+++
coreplugins/branches/labelLayout/AutomaticLayout/src/csplugins/layout/LayoutNode.java
2010-07-16 15:58:11 UTC (rev 20947)
@@ -1,3 +1,69 @@
+/**
+ * Copyright (c) 2006 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions, and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * 3. Redistributions must acknowledge that this software was
+ * originally developed by the UCSF Computer Graphics Laboratory
+ * under support by the NIH National Center for Research Resources,
+ * grant P41-RR01081.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+/**
+* Copyright (C) Gerardo Huck, 2010
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published
+* by the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+
+/**
+ * This class is intended to be a common interface for Layout Node classes
that interact
+ * with LayoutPartition class.
+
+ * In particular, it aims at providing convenient handle
+ * to information about position, the node itself, the node view. Many of
+ * the methods of this class are wrappers for CyNode or NodeView methods, and
+ * these are often wrapped by LayoutPartition methods.
+ *
+ * It was done as part of Google Summer of Code 2010.
+ * Mentor: Mike Smoot
+ * @author <a href="mailto:gerardohuck .at. gmail .dot. com">Gerardo Huck</a>
+ * @version 0.1
+ */
+
package csplugins.layout;
import cytoscape.*;
@@ -9,12 +75,7 @@
import java.util.*;
/**
- * This class is intended to be a common interface for Layout Node classes
that interact
- * with LayoutPartition class.
- * In particular, it aims at providing convenient handle
- * to information about position, the node itself, the node view. Many of
- * the methods of this class are wrappers for CyNode or NodeView methods, and
- * these are often wrapped by LayoutPartition methods.
+
*/
public abstract class LayoutNode {
--
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.