Changeset 3065


Ignore:
Timestamp:
08/09/07 13:55:49 (12 years ago)
Author:
curtis
Message:

Use reasonable default name when saving or exporting overlay data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/overlays/OverlayWidget.java

    r3032 r3065  
    697697        overlaySaveBox.getAccessory(); 
    698698      statsPane.loadSettings(); 
     699 
     700      // set default filename to a reasonable default 
     701      String defaultName = overlay.getParent().getName(); 
     702      defaultName = defaultName.replaceAll("[^\\w]", ""); // sanitize name 
     703      overlaySaveBox.setSelectedFile(new File(defaultName + ".txt")); 
     704 
    699705      int rval = overlaySaveBox.showSaveDialog(this); 
    700706      if (rval != JFileChooser.APPROVE_OPTION) return; 
     
    716722        overlayXLSBox.getAccessory(); 
    717723      statsPane.loadSettings(); 
     724 
     725      // set default filename to a reasonable default 
     726      String defaultName = overlay.getParent().getName(); 
     727      defaultName = defaultName.replaceAll("[^\\w]", ""); // sanitize name 
     728      overlayXLSBox.setSelectedFile(new File(defaultName + ".xls")); 
     729 
    718730      int rval = overlayXLSBox.showDialog(this, "Export"); 
    719731      if (rval != JFileChooser.APPROVE_OPTION) return; 
Note: See TracChangeset for help on using the changeset viewer.