Author: kono
Date: 2010-02-02 12:25:20 -0800 (Tue, 02 Feb 2010)
New Revision: 19139

Modified:
   
coreplugins/trunk/NCBIClient/src/edu/ucsd/bioeng/idekerlab/ncbiclient/NCBIClient.java
   
coreplugins/trunk/NCBIClient/src/edu/ucsd/bioeng/idekerlab/ncbiclient/util/VisualStyleBuilder.java
Log:
Fixed visual style related bug.

Modified: 
coreplugins/trunk/NCBIClient/src/edu/ucsd/bioeng/idekerlab/ncbiclient/NCBIClient.java
===================================================================
--- 
coreplugins/trunk/NCBIClient/src/edu/ucsd/bioeng/idekerlab/ncbiclient/NCBIClient.java
       2010-02-02 20:24:32 UTC (rev 19138)
+++ 
coreplugins/trunk/NCBIClient/src/edu/ucsd/bioeng/idekerlab/ncbiclient/NCBIClient.java
       2010-02-02 20:25:20 UTC (rev 19139)
@@ -102,7 +102,12 @@
 import cytoscape.visual.VisualStyle;
 
 /**
- *
+ * NCBI Web Service Client Plugin main class.
+ * <p>This is part of the core since 2.7.</p>
+ * 
+ * 
+ * @author kono
+ * @since Cytoscape 2.7
  */
 public class NCBIClient extends
                WebServiceClientImplWithGUI<EUtilsServiceSoap, JPanel> 
implements
@@ -164,8 +169,6 @@
        private Boolean canceled = null;
        private ExecutorService executer;
 
-       // private Map<String[], Object> nodeAttrMap = new
-       // ConcurrentHashMap<String[], Object>();
        private Map<String[], Object> attrMap = new ConcurrentHashMap<String[], 
Object>();
        private List<AnnotationCategory> selectedAnn = new 
ArrayList<AnnotationCategory>();
        private int threadNum;
@@ -181,7 +184,6 @@
                try {
                        client = new NCBIClient();
                } catch (Exception e) {
-                       // TODO Auto-generated catch block
                        e.printStackTrace();
                }
        }
@@ -594,9 +596,11 @@
                        }
 
                        if (net == null) {
-                               // Create network without view
+                               
                                net = Cytoscape.createNetwork(nodeList, 
edgeList, "NCBI-Net",
-                                               null, false);
+                                               null, true);
+                               
Cytoscape.getVisualMappingManager().setVisualStyle(getDefaultVisualStyle());
+                               
                                Cytoscape.firePropertyChange(
                                                
WSResponseType.DATA_IMPORT_FINISHED.toString(), null,
                                                net);
@@ -616,8 +620,6 @@
                                
Cytoscape.getPropertyChangeSupport().firePropertyChange(pce);
                        }
 
-                       
Cytoscape.firePropertyChange(Cytoscape.ATTRIBUTES_CHANGED, null,
-                                       null);
                } catch (InterruptedException e1) {
                        System.out.println("TIMEOUT");
                        throw new CyWebServiceException(

Modified: 
coreplugins/trunk/NCBIClient/src/edu/ucsd/bioeng/idekerlab/ncbiclient/util/VisualStyleBuilder.java
===================================================================
--- 
coreplugins/trunk/NCBIClient/src/edu/ucsd/bioeng/idekerlab/ncbiclient/util/VisualStyleBuilder.java
  2010-02-02 20:24:32 UTC (rev 19138)
+++ 
coreplugins/trunk/NCBIClient/src/edu/ucsd/bioeng/idekerlab/ncbiclient/util/VisualStyleBuilder.java
  2010-02-02 20:25:20 UTC (rev 19139)
@@ -5,6 +5,7 @@
 
 import java.awt.Color;
 
+import cytoscape.Cytoscape;
 import cytoscape.visual.EdgeAppearanceCalculator;
 import cytoscape.visual.GlobalAppearanceCalculator;
 import cytoscape.visual.LineStyle;
@@ -45,6 +46,13 @@
        private VisualStyleBuilder() {
                defaultVS = buidlDefaultStyle();
                newVS = buildNewStyle();
+               
+               if (Cytoscape.getVisualMappingManager().getCalculatorCatalog()
+                               .getVisualStyle(newVS.getName()) == null) {
+                       
Cytoscape.getVisualMappingManager().getCalculatorCatalog()
+                                       .addVisualStyle(newVS);
+               }
+                       
        }
 
        public VisualStyle getDefStyle() {

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