Changeset 505 for trunk/loci/visbio/view


Ignore:
Timestamp:
07/25/05 13:59:30 (15 years ago)
Author:
curtis
Message:

More work on SendToIJPane.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/view/CaptureHandler.java

    r503 r505  
    3737import loci.visbio.WindowManager; 
    3838import loci.visbio.state.*; 
    39 import loci.visbio.util.DataUtil; 
    40 import loci.visbio.util.XMLUtil; 
     39import loci.visbio.util.*; 
    4140import org.w3c.dom.Element; 
    4241import visad.*; 
     
    164163    new Thread("VisBio-SendToImageJThread-" + window.getName()) { 
    165164      public void run() { 
    166         ImageJ ij = IJ.getInstance(); 
    167         if (ij == null || (ij != null && !ij.isShowing())) { 
    168           // create new ImageJ instance 
    169           File dir = new File(System.getProperty("user.dir")); 
    170           File newDir = new File(dir.getParentFile().getParentFile(), "ij"); 
    171           System.setProperty("user.dir", newDir.getPath()); 
    172           new ImageJ(null); 
    173           System.setProperty("user.dir", dir.getPath()); 
    174  
    175           // display ImageJ warning 
    176           OptionManager om = (OptionManager) 
    177             window.getVisBio().getManager(OptionManager.class); 
    178           om.checkWarning(panel, DisplayManager.WARN_IMAGEJ, false, 
    179             "Quitting VisBio will also shut down ImageJ, with no\n" + 
    180             "warning or opportunity to save your work. Please remember\n" + 
    181             "remember to save your work in ImageJ before closing VisBio."); 
    182         } 
    183         new ImagePlus("VisBio snapshot", getSnapshot()).show(); 
     165        ImageJUtil.sendToImageJ(new ImagePlus( 
     166          window.getName() + " snapshot", getSnapshot()), window.getVisBio()); 
    184167      } 
    185168    }.start(); 
Note: See TracChangeset for help on using the changeset viewer.