Author: ruschein
Date: 2011-07-29 14:08:38 -0700 (Fri, 29 Jul 2011)
New Revision: 26339

Modified:
   
core3/work-swing-impl/trunk/impl/src/main/java/org/cytoscape/work/internal/tunables/FileHandler.java
Log:
Minor cleanup.

Modified: 
core3/work-swing-impl/trunk/impl/src/main/java/org/cytoscape/work/internal/tunables/FileHandler.java
===================================================================
--- 
core3/work-swing-impl/trunk/impl/src/main/java/org/cytoscape/work/internal/tunables/FileHandler.java
        2011-07-29 20:25:05 UTC (rev 26338)
+++ 
core3/work-swing-impl/trunk/impl/src/main/java/org/cytoscape/work/internal/tunables/FileHandler.java
        2011-07-29 21:08:38 UTC (rev 26339)
@@ -187,31 +187,30 @@
        // Click on the "open" or "save" button action listener
        private final class myFileActionListener implements ActionListener{
                public void actionPerformed(ActionEvent ae) {
-                               try_again:  {
-       
-                               final int load_or_save = input ? FileUtil.LOAD 
: FileUtil.SAVE;
+                       final int load_or_save = input ? FileUtil.LOAD : 
FileUtil.SAVE;
                                
-                               if (load_or_save == FileUtil.SAVE){
-                                       //In case of export, we can not detect 
the filter current used, so we we use filter "All image files" or 
-                                       //"All network files" when export image 
or network
-                                       FileChooserFilter filter = null;
-                                       for (int i=0; i<filters.size(); i++){
-                                               filter = filters.get(i);
-                                               if 
(filter.getDescription().trim().equalsIgnoreCase("All image files") ||
-                                                               
filter.getDescription().trim().equalsIgnoreCase("All network files")){
-                                                       filters = new 
ArrayList<FileChooserFilter>();
-                                                       filters.add(filter);
-                                                       break;
-                                               }
+                       if (load_or_save == FileUtil.SAVE){
+                               //In case of export, we can not detect the 
filter current used, so we we use filter "All image files" or 
+                               //"All network files" when export image or 
network
+                               FileChooserFilter filter = null;
+                               for (int i=0; i<filters.size(); i++){
+                                       filter = filters.get(i);
+                                       if 
(filter.getDescription().trim().equalsIgnoreCase("All image files") ||
+                                           
filter.getDescription().trim().equalsIgnoreCase("All network files")){
+                                               filters = new 
ArrayList<FileChooserFilter>();
+                                               filters.add(filter);
+                                               break;
                                        }
                                }
+                       }
                                
-                               final File file = 
fileUtil.getFile(SwingUtilities.getWindowAncestor(panel), titleLabel.getText(), 
load_or_save, filters);
-                               if (file != null) {
-                                       fileTextField.setFont(FILE_NAME_FONT);
-                                       
fileTextField.setText(file.getAbsolutePath());
-                                       
fileTextField.removeMouseListener(mouseClick);
-                               }
+                       final File file =
+                               
fileUtil.getFile(SwingUtilities.getWindowAncestor(panel),
+                                                titleLabel.getText(), 
load_or_save, filters);
+                       if (file != null) {
+                               fileTextField.setFont(FILE_NAME_FONT);
+                               fileTextField.setText(file.getAbsolutePath());
+                               fileTextField.removeMouseListener(mouseClick);
                        }
                }
        }

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