Author: Christian Lopes
Date: 2011-05-13 13:04:55 -0700 (Fri, 13 May 2011)
New Revision: 25054

Modified:
   
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/NodeShapeVisualProperty.java
Log:
Added mappings to parse from regular XGMML "type" keys and older cytoscape keys 
to current node shapes.

Modified: 
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/NodeShapeVisualProperty.java
===================================================================
--- 
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/NodeShapeVisualProperty.java
    2011-05-13 19:42:17 UTC (rev 25053)
+++ 
core3/presentation-api/trunk/src/main/java/org/cytoscape/view/presentation/property/NodeShapeVisualProperty.java
    2011-05-13 20:04:55 UTC (rev 25054)
@@ -3,12 +3,9 @@
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
-import java.util.Set;
 
 import org.cytoscape.view.model.AbstractVisualProperty;
 import org.cytoscape.view.model.DiscreteRange;
-import org.cytoscape.view.model.DiscreteRange;
-import org.cytoscape.view.presentation.property.values.LineType;
 import org.cytoscape.view.presentation.property.values.NodeShape;
 
 public final class NodeShapeVisualProperty extends
@@ -46,6 +43,16 @@
                
DEFAULT_SHAPES.put(ELLIPSE.getSerializableString().toUpperCase(), ELLIPSE);
                
DEFAULT_SHAPES.put(HEXAGON.getSerializableString().toUpperCase(), HEXAGON);
                
DEFAULT_SHAPES.put(OCTAGON.getSerializableString().toUpperCase(), OCTAGON);
+               // Keys of older versions of Cytoscape:
+               DEFAULT_SHAPES.put("RECT", RECTANGLE);
+               DEFAULT_SHAPES.put("ROUNDRECT", ROUND_RECTANGLE);
+               DEFAULT_SHAPES.put("ROUND_RECT", ROUND_RECTANGLE);
+               // Regular XGMML keys:
+               DEFAULT_SHAPES.put("BOX", RECTANGLE);
+               DEFAULT_SHAPES.put("CIRCLE", ELLIPSE);
+               DEFAULT_SHAPES.put("VER_ELLIPSIS", ELLIPSE);
+               DEFAULT_SHAPES.put("HOR_ELLIPSIS", ELLIPSE);
+               DEFAULT_SHAPES.put("RHOMBUS", PARALLELOGRAM);
 
                NODE_SHAPE_RANGE = new 
DiscreteRange<NodeShape>(NodeShape.class, new 
HashSet<NodeShape>(DEFAULT_SHAPES.values()));
        }

-- 
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