Changeset 2334


Ignore:
Timestamp:
02/23/07 17:43:40 (13 years ago)
Author:
curtis
Message:

First cut at graying out File>Save and QuickSave for third party formats.
Doesn't work yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/ome/notebook/MetadataNotebook.java

    r2330 r2334  
    7676  /**The File>New menu item.*/ 
    7777  protected JMenuItem fileNew; 
     78 
     79  /**The File>Save menu item.*/ 
     80  protected JMenuItem fileSave; 
    7881 
    7982  /**The NotePane that displays a comprehensive list of all notes.*/ 
     
    196199    JSeparator jSep = new JSeparator(); 
    197200    file.add(jSep); 
    198     JMenuItem fileSave = new JMenuItem("Save"); 
     201    fileSave = new JMenuItem("Save"); 
    199202    file.add(fileSave); 
    200203    fileSave.setActionCommand("save"); 
     
    334337 
    335338  /** Sets the current file being displayed to this file. */ 
    336   protected void setCurrentFile(File aFile) { currentFile = aFile; } 
     339  protected void setCurrentFile(File aFile) { 
     340    currentFile = aFile; 
     341    boolean allowSave = !metadata.testThirdParty(currentFile); 
     342    fileSave.setEnabled(allowSave); 
     343    for (int i=0; i<metadata.tabPanelList.size(); i++) { 
     344      MetadataPane.TabPanel tp = (MetadataPane.TabPanel) 
     345        metadata.tabPanelList.get(i); 
     346      tp.saveButton.setEnabled(allowSave); 
     347    } 
     348  } 
    337349 
    338350  /** Opens a file, sets the title of the frame to reflect the current file. */ 
Note: See TracChangeset for help on using the changeset viewer.