Author: kono
Date: 2010-09-16 18:30:47 -0700 (Thu, 16 Sep 2010)
New Revision: 21915

Added:
   
core3/vizmap-api/branches/vp-tree/src/main/java/org/cytoscape/view/vizmap/VisualStyleFactory.java
Modified:
   core3/vizmap-api/branches/vp-tree/pom.xml
   
core3/vizmap-api/branches/vp-tree/src/main/java/org/cytoscape/view/vizmap/VisualMappingManager.java
Log:
Refactored version of VP tree.  VisualLexicons are moved to presentation layer.

Modified: core3/vizmap-api/branches/vp-tree/pom.xml
===================================================================
--- core3/vizmap-api/branches/vp-tree/pom.xml   2010-09-17 01:26:43 UTC (rev 
21914)
+++ core3/vizmap-api/branches/vp-tree/pom.xml   2010-09-17 01:30:47 UTC (rev 
21915)
@@ -123,7 +123,7 @@
                <!-- Cytoscape modules -->
                <dependency>
                        <groupId>org.cytoscape</groupId>
-                       <artifactId>viewmodel-api</artifactId>
+                       <artifactId>presentation-api</artifactId>
                        <version>1.0-SNAPSHOT</version>
                </dependency>
 

Modified: 
core3/vizmap-api/branches/vp-tree/src/main/java/org/cytoscape/view/vizmap/VisualMappingManager.java
===================================================================
--- 
core3/vizmap-api/branches/vp-tree/src/main/java/org/cytoscape/view/vizmap/VisualMappingManager.java
 2010-09-17 01:26:43 UTC (rev 21914)
+++ 
core3/vizmap-api/branches/vp-tree/src/main/java/org/cytoscape/view/vizmap/VisualMappingManager.java
 2010-09-17 01:30:47 UTC (rev 21915)
@@ -37,9 +37,9 @@
 package org.cytoscape.view.vizmap;
 
 import java.util.Collection;
+import java.util.Set;
 
 import org.cytoscape.view.model.CyNetworkView;
-import org.cytoscape.view.model.VisualLexiconManager;
 
 
 /**
@@ -54,13 +54,15 @@
  *
  */
 public interface VisualMappingManager {
+       
        /**
         *  Set a Visual Style to the target view
         *
         * @param vs Visual Style to be set.
         * @param nv Target network view
         */
-       public void setVisualStyle(VisualStyle vs, CyNetworkView nv);
+       void setVisualStyle(final VisualStyle vs, final CyNetworkView nv);
+       
 
        /**
         *  Returns the associated Visual Style for the target view.
@@ -69,37 +71,17 @@
         *
         * @return  Associated Visual Style for the view.
         */
-       public VisualStyle getVisualStyle(CyNetworkView nv);
+       VisualStyle getVisualStyle(final CyNetworkView nv);
 
-       /**
-        * Create a copy of given Visual Style.
-        *
-        * @param originalVS
-        *            VS to be copied from.
-        *
-        * @return Copied VS
-        */
-       public VisualStyle copyVisualStyle(VisualStyle originalVS);
 
        /**
-        * Create a new Visual Style.
-        * 
-        * @param title Title of the visual style.  This can be null, but in 
that case, 
-        *                                      default title will be used.
-        *                      Note: This is NOT an identifier of this object, 
just a title.
-        *
-        * @return New Visual Style
-        */
-       public VisualStyle createVisualStyle(String title);
-
-       /**
         * Returns all available Visual Styles managed by this object.
         *
         * @return Collection of all available Visual Styles.
         * 
-        * TODO: Collection or Set? 
         */
-       public Collection<VisualStyle> getAllVisualStyles();
+       Set<VisualStyle> getAllVisualStyles();
+       
 
        /**
         * Remove a Visual Style.
@@ -107,6 +89,14 @@
         * @param vs Visual Style to be removed.
         * 
         */
-       public void removeVisualStyle(VisualStyle vs);
+       void removeVisualStyle(final VisualStyle vs);
+       
+       
+       /**
+        * Add a new style to manager
+        *
+        * @param vs
+        */
+       void addVisualStyle(final VisualStyle vs);
 
 }

Added: 
core3/vizmap-api/branches/vp-tree/src/main/java/org/cytoscape/view/vizmap/VisualStyleFactory.java
===================================================================
--- 
core3/vizmap-api/branches/vp-tree/src/main/java/org/cytoscape/view/vizmap/VisualStyleFactory.java
                           (rev 0)
+++ 
core3/vizmap-api/branches/vp-tree/src/main/java/org/cytoscape/view/vizmap/VisualStyleFactory.java
   2010-09-17 01:30:47 UTC (rev 21915)
@@ -0,0 +1,29 @@
+package org.cytoscape.view.vizmap;
+
+import org.cytoscape.view.presentation.RenderingEngine;
+
+public interface VisualStyleFactory {
+       
+       /**
+        * Create a new Visual Style.
+        * 
+        * @param title Title of the visual style.  This can be null, but in 
that case, 
+        *                                      default title will be used.
+        *                      Note: This is NOT an identifier of this object, 
just a title.
+        *
+        * @return New Visual Style
+        */
+       VisualStyle createVisualStyle(final String title, final 
RenderingEngine<?> engine);
+       
+       
+       /**
+        * Create a copy of given Visual Style.
+        *
+        * @param original
+        *            VS to be copied from.
+        *
+        * @return Copied VS
+        */
+       VisualStyle createVisualStyle(final VisualStyle original);
+
+}

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