Author: pwang
Date: 2010-02-03 15:14:58 -0800 (Wed, 03 Feb 2010)
New Revision: 19168
Modified:
cytoscape/trunk/src/cytoscape/actions/ExportAsGMLAction.java
Log:
Add a filter 'gml' for the fileChooser and provide a suggested-name for the file
Modified: cytoscape/trunk/src/cytoscape/actions/ExportAsGMLAction.java
===================================================================
--- cytoscape/trunk/src/cytoscape/actions/ExportAsGMLAction.java
2010-02-03 22:58:10 UTC (rev 19167)
+++ cytoscape/trunk/src/cytoscape/actions/ExportAsGMLAction.java
2010-02-03 23:14:58 UTC (rev 19168)
@@ -115,7 +115,17 @@
String name;
try {
- name = FileUtil.getFile("Export Network as GML",
FileUtil.SAVE, new CyFileFilter[] { })
+
+ CyFileFilter cyFileFilter = new CyFileFilter("gml");
+
+ String suggestedFileName =
Cytoscape.getCurrentNetwork().getIdentifier();
+ if (!suggestedFileName.endsWith(".gml")){
+ suggestedFileName = suggestedFileName+ ".gml";
+ }
+
+ File suggestedFile = new File(suggestedFileName);
+
+ name = FileUtil.getFile("Export Network as GML",
FileUtil.SAVE, cyFileFilter, suggestedFile)
.toString();
} catch (Exception exp) {
// this is because the selection was canceled
--
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.