Author: pwang
Date: 2010-02-03 14:58:10 -0800 (Wed, 03 Feb 2010)
New Revision: 19167
Modified:
cytoscape/trunk/src/cytoscape/actions/ExportAsInteractionsAction.java
Log:
Add a filter 'sif' for the fileChooser and provide a suggested-name for the file
Modified: cytoscape/trunk/src/cytoscape/actions/ExportAsInteractionsAction.java
===================================================================
--- cytoscape/trunk/src/cytoscape/actions/ExportAsInteractionsAction.java
2010-02-03 22:53:05 UTC (rev 19166)
+++ cytoscape/trunk/src/cytoscape/actions/ExportAsInteractionsAction.java
2010-02-03 22:58:10 UTC (rev 19167)
@@ -107,9 +107,18 @@
// MLC 09/19/05 END.
public void actionPerformed(ActionEvent e) {
+
+ CyFileFilter cyFileFilter = new CyFileFilter("sif");
+
+ String suggestedFileName =
Cytoscape.getCurrentNetwork().getIdentifier();
+ if (!suggestedFileName.endsWith(".sif")){
+ suggestedFileName = suggestedFileName+ ".sif";
+ }
+
+ File suggestedFile = new File(suggestedFileName);
+
// get the file name
- File file = FileUtil.getFile("Save Network as Interactions",
FileUtil.SAVE,
- new CyFileFilter[] { });
+ File file = FileUtil.getFile("Save Network as Interactions",
FileUtil.SAVE, cyFileFilter, suggestedFile);
if (file != null) {
String fileName = file.getAbsolutePath();
--
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.