Author: mes
Date: 2010-07-18 12:28:25 -0700 (Sun, 18 Jul 2010)
New Revision: 20963

Modified:
   
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/FileHandler.java
Log:
added support for default files

Modified: 
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/FileHandler.java
===================================================================
--- 
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/FileHandler.java
     2010-07-18 19:05:02 UTC (rev 20962)
+++ 
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/FileHandler.java
     2010-07-18 19:28:25 UTC (rev 20963)
@@ -42,7 +42,7 @@
        private JSeparator titleSeparator;
        private MouseClic mouseClic;
        private GroupLayout layout;
-       private enum Type {NETWORK,SESSION,ATTRIBUTES};
+       private enum Type {NETWORK,SESSION,ATTRIBUTES,DEFAULT};
        private Type type;      
        //private FileUtil flUtil;
        
@@ -124,9 +124,19 @@
     
     //set the type of file that will be imported depending on the "Param" 
Tunable annotation of the file
     private void setFileType(Tunable tunable){
-       for(Param s :tunable.flag())if(s.equals(Param.network))type = 
Type.NETWORK;
-               for(Param s :tunable.flag())if(s.equals(Param.session))type = 
Type.SESSION;
-               for(Param s :tunable.flag())if(s.equals(Param.attributes))type 
= Type.ATTRIBUTES;       
+       for(Param s :tunable.flag()) {
+                       if(s.equals(Param.network)) {
+                               type = Type.NETWORK;
+                               return;
+                       } else if(s.equals(Param.session)) {
+                               type = Type.SESSION;
+                               return;
+                       } else if(s.equals(Param.attributes)) {
+                               type = Type.ATTRIBUTES;         
+                               return;
+                       }
+               }
+               type = Type.DEFAULT;
     }    
 
     

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