Changeset 390 for trunk/loci/visbio/view


Ignore:
Timestamp:
05/11/05 19:18:00 (15 years ago)
Author:
curtis
Message:

Some work on state save/restore logic.

Location:
trunk/loci/visbio/view
Files:
3 edited

Legend:

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

    r375 r390  
    180180            window.getVisBio().getManager(OptionManager.class); 
    181181          om.checkWarning(DisplayManager.WARN_IMAGEJ, false, 
    182             "Quitting ImageJ may also shut down VisBio, with no\n" + 
    183             "warning or opportunity to save your work. Similarly,\n" + 
    184             "quitting VisBio will shut down ImageJ without warning.\n" + 
    185             "Please remember to save your work in both programs\n" + 
    186             "before closing either one."); 
     182            "Quitting VisBio will also shut down ImageJ, with no\n" + 
     183            "warning or opportunity to save your work. Please remember\n" + 
     184            "remember to save your work in ImageJ before closing VisBio."); 
    187185        } 
    188186        new ImagePlus("VisBio snapshot", getSnapshot()).show(); 
  • trunk/loci/visbio/view/DisplayManager.java

    r373 r390  
    4343  /** String for ImageJ quit warning. */ 
    4444  public static final String WARN_IMAGEJ = 
    45     "Warn about problem where quitting ImageJ also quits VisBio"; 
     45    "Warn about problem where quitting VisBio also quits ImageJ"; 
    4646 
    4747 
     
    200200    om.addBooleanOption("Warnings", WARN_IMAGEJ, 'i', 
    201201      "Toggles whether VisBio displays a warning about " + 
    202       "how quitting ImageJ also quits VisBio", true); 
     202      "how quitting VisBio also quits ImageJ", true); 
    203203 
    204204 
  • trunk/loci/visbio/view/StackLink.java

    r373 r390  
    283283  /** Writes the current state to the given DOM element ("LinkedData"). */ 
    284284  public void saveState(Element el) throws SaveException { 
    285     super.saveState(el); 
    286  
    287     // find appropriate TransformLink 
    288     Element child = null; 
    289     Element[] els = XMLUtil.getChildren(el, "TransformLink"); 
    290     String id = "" + trans.getTransformId(); 
    291     for (int i=0; i<els.length; i++) { 
    292       if (id.equals(els[i].getAttribute("id"))) { 
    293         child = els[i]; 
    294         break; 
    295       } 
    296     } 
     285    Element child = XMLUtil.createChild(el, "StackLink"); 
     286    child.setAttribute("id", "" + trans.getTransformId()); 
     287    if (colorHandler != null) colorHandler.saveState(child); 
     288    child.setAttribute("visible", "" + isVisible()); 
    297289 
    298290    // save stack parameters 
Note: See TracChangeset for help on using the changeset viewer.