Changeset 4327


Ignore:
Timestamp:
08/25/08 12:00:07 (12 years ago)
Author:
melissa
Message:

Added options window to data browser. It's functional, but needs more work to make it look nice.

Location:
trunk/loci
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/gui/CacheIndicator.java

    r4317 r4327  
    156156 
    157157  public void cacheUpdated(CacheEvent e) { 
    158     this.cache = (Cache) e.getSource(); 
     158    if (e.getSource() instanceof Cache) this.cache = (Cache) e.getSource(); 
    159159    int type = e.getType(); 
    160     if (type == CacheEvent.OBJECT_LOADED || type == CacheEvent.OBJECT_DROPPED) { 
     160    if (type == CacheEvent.OBJECT_LOADED || type == CacheEvent.OBJECT_DROPPED || 
     161      !(e.getSource() instanceof Cache)) 
     162    { 
    161163      // cache has changed; update GUI 
    162164      SwingUtilities.invokeLater(new Runnable() { 
  • trunk/loci/plugins/DataBrowser.java

    r4321 r4327  
    6464 
    6565  protected JFrame metaWindow; 
    66   //protected BrowserOptionsWindow optionsWindow; 
     66  protected BrowserOptionsWindow optionsWindow; 
    6767  protected String xml; 
    6868 
     
    138138      cPanel.add(cCache, BorderLayout.SOUTH); 
    139139 
    140       // build options window 
    141       //optionsWindow = 
    142       //  new BrowserOptionsWindow("Options - " + getTitle(), cache); 
     140      optionsWindow = 
     141        new BrowserOptionsWindow("Options - " + getTitle(), cache); 
    143142    } 
    144143 
     
    153152    options = new Button("Options"); 
    154153    options.addActionListener(this); 
    155     //options.setEnabled(optionsWindow != null); 
     154    options.setEnabled(optionsWindow != null); 
    156155    metadata = new Button("Metadata"); 
    157156    metadata.addActionListener(this); 
     
    294293    else if (src == options) { 
    295294      // center window and show 
    296       /* 
    297295      Rectangle r = getBounds(); 
    298296      Dimension w = optionsWindow.getSize(); 
     
    301299      optionsWindow.setLocation(x, y); 
    302300      optionsWindow.setVisible(true); 
    303       */ 
    304301    } 
    305302    else if (src == metadata) { 
Note: See TracChangeset for help on using the changeset viewer.