Author: kono
Date: 2011-12-13 10:19:41 -0800 (Tue, 13 Dec 2011)
New Revision: 27780

Modified:
   
core3/impl/trunk/core-task-impl/src/main/java/org/cytoscape/task/internal/creation/CreateNetworkViewTask.java
   
core3/impl/trunk/core-task-impl/src/main/java/org/cytoscape/task/internal/loadnetwork/LoadNetworkURLTaskFactoryImpl.java
Log:
Number of tasks had been edited.

Modified: 
core3/impl/trunk/core-task-impl/src/main/java/org/cytoscape/task/internal/creation/CreateNetworkViewTask.java
===================================================================
--- 
core3/impl/trunk/core-task-impl/src/main/java/org/cytoscape/task/internal/creation/CreateNetworkViewTask.java
       2011-12-13 18:02:24 UTC (rev 27779)
+++ 
core3/impl/trunk/core-task-impl/src/main/java/org/cytoscape/task/internal/creation/CreateNetworkViewTask.java
       2011-12-13 18:19:41 UTC (rev 27780)
@@ -71,17 +71,17 @@
        }
 
        public void run(TaskMonitor taskMonitor) throws Exception {
-               taskMonitor.setProgress(0.0);
+               
+               taskMonitor.setProgress(0.01d);
+               taskMonitor.setStatusMessage("Creating network view...");
+               
                final long start = System.currentTimeMillis();
-
-               taskMonitor.setStatusMessage("Creating network view...");
-
+               
                try {
                        // By calling this task, actual view will be created 
even if it's a
                        // large network.
-                       taskMonitor.setProgress(0.4);
                        final CyNetworkView view = 
viewFactory.createNetworkView(network, false);
-                       taskMonitor.setProgress(0.8);
+                       taskMonitor.setProgress(0.7d);
                        networkViewManager.addNetworkView(view);
                        
                        // Apply layout only when it is necessary.
@@ -98,7 +98,7 @@
                                new CreateNetworkViewEdit(eventHelper, network, 
viewFactory,
                                                          networkViewManager));
                
-               taskMonitor.setProgress(1.0);
+               taskMonitor.setProgress(1.0d);
                taskMonitor.setStatusMessage("Network view successfully create 
for:  "
                                + 
network.getRow(network).get(CyTableEntry.NAME, String.class));
                

Modified: 
core3/impl/trunk/core-task-impl/src/main/java/org/cytoscape/task/internal/loadnetwork/LoadNetworkURLTaskFactoryImpl.java
===================================================================
--- 
core3/impl/trunk/core-task-impl/src/main/java/org/cytoscape/task/internal/loadnetwork/LoadNetworkURLTaskFactoryImpl.java
    2011-12-13 18:02:24 UTC (rev 27779)
+++ 
core3/impl/trunk/core-task-impl/src/main/java/org/cytoscape/task/internal/loadnetwork/LoadNetworkURLTaskFactoryImpl.java
    2011-12-13 18:19:41 UTC (rev 27780)
@@ -87,7 +87,8 @@
 
        public TaskIterator createTaskIterator() {
                task = new LoadNetworkURLTask(mgr, netmgr, networkViewManager, 
props, cyNetworkNaming, streamUtil);
-               return new TaskIterator(task);
+               // Usually we need to create view, so expected number is 2.
+               return new TaskIterator(2, task);
        }
        
        @Override

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