Author: mmichaud
Date: 2009-03-09 10:00:01 -0700 (Mon, 09 Mar 2009)
New Revision: 16181
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/GuiHandlerFactory.java
Log:
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
2009-03-09 12:58:16 UTC (rev 16180)
+++
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/FileHandler.java
2009-03-09 17:00:01 UTC (rev 16181)
@@ -10,6 +10,8 @@
import org.cytoscape.work.Tunable;
+import cytoscape.util.*;
+
public class FileHandler extends AbstractGuiHandler {
JButton button;
@@ -17,9 +19,11 @@
JFileChooser fileChooser;
boolean filechoosen;
JTextField path;
+ FileUtil flUtil;
- public FileHandler(Field f, Object o, Tunable t) {
+ public FileHandler(Field f, Object o, Tunable t,FileUtil flUtil) {
super(f,o,t);
+ this.flUtil = flUtil;
filechoosen = false;
fileChooser = new JFileChooser();
@@ -42,8 +46,9 @@
int ret = fileChooser.showOpenDialog(null);
if (ret == JFileChooser.APPROVE_OPTION) {
File file = fileChooser.getSelectedFile();
+ //File file =
flUtil.getFile("TEST",FileUtil.LOAD);
if ( file != null ) {
- myFile = file;
+ //myFile = file;
try{
f.set(o,file);
}catch (Exception e) {
e.printStackTrace();}
Modified:
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GuiHandlerFactory.java
===================================================================
---
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GuiHandlerFactory.java
2009-03-09 12:58:16 UTC (rev 16180)
+++
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GuiHandlerFactory.java
2009-03-09 17:00:01 UTC (rev 16181)
@@ -11,15 +11,18 @@
import org.cytoscape.work.Tunable;
import org.cytoscape.work.HandlerFactory;
import org.cytoscape.work.util.*;
+import cytoscape.util.FileUtil;
public class GuiHandlerFactory implements HandlerFactory<Guihandler> {
private Bookmarks bookmarks;
private BookmarksUtil bkUtil;
+ private FileUtil flUtil;
public GuiHandlerFactory(CyProperty<Bookmarks> book, BookmarksUtil
bkUtil) {
this.bookmarks = book.getProperties();
this.bkUtil = bkUtil;
+ this.flUtil = flUtil;
}
public Guihandler getHandler(Field f, Object o, Tunable t){
@@ -51,9 +54,11 @@
else if(type == ListMultipleSelection.class)
return new ListMultipleHandler<String>(f,o,t);
else if(type == File.class)
- return new FileHandler(f,o,t);
+ return new FileHandler(f,o,t,flUtil);
else if(type == URL.class)
return new URLHandler(f,o,t,bookmarks,bkUtil);
+// else if(type == URL.class)
+// return new
InputStreamHandler(f,o,t,bookmarkrs,bkUtil,flUtil);
return null;
}
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---