Author: kono
Date: 2009-12-14 13:05:58 -0800 (Mon, 14 Dec 2009)
New Revision: 18754

Modified:
   cytoscape/trunk/lib/ding.jar
   cytoscape/trunk/src/cytoscape/Cytoscape.java
   cytoscape/trunk/src/cytoscape/view/CytoscapeDesktop.java
Log:
Image creation for nested network will be done in loading process.  This is for 
avoiding zoom-in/out performance problem.

Modified: cytoscape/trunk/lib/ding.jar
===================================================================
(Binary files differ)

Modified: cytoscape/trunk/src/cytoscape/Cytoscape.java
===================================================================
--- cytoscape/trunk/src/cytoscape/Cytoscape.java        2009-12-14 20:35:52 UTC 
(rev 18753)
+++ cytoscape/trunk/src/cytoscape/Cytoscape.java        2009-12-14 21:05:58 UTC 
(rev 18754)
@@ -1403,15 +1403,25 @@
                if (reader instanceof NestedNetworkReader) {
                        // This is a reader which creates multiple networks.
                        final List<CyNetwork> networks = 
((NestedNetworkReader)reader).getNetworks();
+                       
+                       // Turn views off for performance
+                       
Cytoscape.getDesktop().getNetworkViewManager().getDesktopPane().setVisible(false);
                        for (CyNetwork network : networks) {
                                getNetworkMap().put(network.getIdentifier(), 
network);
-                               //firePropertyChange(NETWORK_CREATED, null /* 
parentID */, network.getIdentifier());
                                if (create_view && (network.getNodeCount() < 
Integer.parseInt(CytoscapeInit.getProperties()
                                                                                
              .getProperty("viewThreshold")))) {
                                        createNetworkView(network);
                                }
                        }
-
+                       final CyAttributes netAttr = 
Cytoscape.getNetworkAttributes();
+                       for (CyNetworkView dview : 
Cytoscape.getNetworkViewMap().values()) {
+                               final List<String> parents = 
netAttr.getListAttribute(dview.getNetwork().getIdentifier(), 
CyNode.PARENT_NODES_ATTR);
+                               if (parents != null && parents.size() != 0) {
+                                       ((DingNetworkView)dview).getSnapshot(1, 
1);
+                               }
+                       }
+                       
Cytoscape.getDesktop().getNetworkViewManager().getDesktopPane().setVisible(true);
+                       
                        return networks.get(0); // Root network.
                } else {
                        // get the RootGraph indices of the nodes and

Modified: cytoscape/trunk/src/cytoscape/view/CytoscapeDesktop.java
===================================================================
--- cytoscape/trunk/src/cytoscape/view/CytoscapeDesktop.java    2009-12-14 
20:35:52 UTC (rev 18753)
+++ cytoscape/trunk/src/cytoscape/view/CytoscapeDesktop.java    2009-12-14 
21:05:58 UTC (rev 18754)
@@ -51,14 +51,12 @@
 import javax.help.HelpBroker;
 import javax.help.HelpSet;
 import javax.swing.ImageIcon;
-import javax.swing.JComboBox;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JSplitPane;
 import javax.swing.JTabbedPane;
-import javax.swing.JToolBar;
 import javax.swing.SwingConstants;
 import javax.swing.WindowConstants;
 import javax.swing.border.EmptyBorder;
@@ -75,8 +73,8 @@
 import cytoscape.view.cytopanels.CytoPanelState;
 import cytoscape.visual.VisualMappingManager;
 import cytoscape.visual.VisualStyle;
-import cytoscape.visual.ui.VizMapBypassNetworkListener;
 import cytoscape.visual.ui.NestedNetworkListener;
+import cytoscape.visual.ui.VizMapBypassNetworkListener;
 import cytoscape.visual.ui.VizMapperMainPanel;
 
 

--

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