Changeset 2955 for trunk


Ignore:
Timestamp:
07/10/07 09:36:26 (13 years ago)
Author:
melissa
Message:

Added searchable text window.

Location:
trunk/loci/plugins
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/Importer.java

    r2941 r2955  
    3030import ij.measure.Calibration; 
    3131import ij.process.*; 
    32 import ij.text.TextWindow; 
     32import java.awt.Dimension; 
     33import java.awt.Frame; 
     34import java.awt.event.*; 
    3335import java.awt.image.*; 
    3436import java.io.*; 
     
    323325        } 
    324326 
    325         // NB: no need to register this with WindowManager; TextWindows are 
    326         // automatically registered 
    327         TextWindow tw = new TextWindow("Metadata - " + currentFile, 
    328           "Key\tValue", sb.toString(), 400, 400); 
    329         tw.setVisible(true); 
     327        SearchablePanel spanel = new SearchablePanel();  
     328        spanel.setColumnHeadings("Key\tValue"); 
     329        spanel.append(sb.toString()); 
     330        Frame w = new Frame("Metadata - " + currentFile);  
     331        w.add(spanel); 
     332        w.setSize(new Dimension(400, 400)); 
     333         
     334        w.addWindowListener(new WindowAdapter() { 
     335          public void windowClosing(WindowEvent e) { 
     336            Frame frame = (Frame) e.getSource(); 
     337            frame.setVisible(false); 
     338            frame.dispose(); 
     339          } 
     340        }); 
     341         
     342        WindowManager.addWindow(w);  
     343        w.setVisible(true);  
    330344      } 
    331345 
Note: See TracChangeset for help on using the changeset viewer.