Changeset 413 for trunk/loci/visbio/view


Ignore:
Timestamp:
05/26/05 16:02:14 (15 years ago)
Author:
curtis
Message:

Save and restore breakaway panel's current edge properly.

File:
1 edited

Legend:

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

    r404 r413  
    6161 
    6262 
    63   // -- Handlers -- 
     63  // -- Fields - handlers -- 
    6464 
    6565  /** Handles logic for controlling the VisAD display's view. */ 
     
    7373 
    7474 
    75   // -- GUI components -- 
     75  // -- Fields - GUI components -- 
    7676 
    7777  /** Associated display manager. */ 
     
    8888 
    8989 
    90   // -- Other fields -- 
     90  // -- Fields - initial state -- 
     91 
     92  /** Initial edge of breakaway panel. */ 
     93  protected String initialEdge; 
     94 
     95 
     96  // -- Fields - other -- 
    9197 
    9298  /** String representation of this display. */ 
     
    310316      // breakaway panel for display controls 
    311317      controls = new BreakawayPanel(pane, "Controls - " + name, true); 
    312       controls.setEdge(BorderLayout.EAST); 
     318      if (initialEdge == null) initialEdge = BorderLayout.EAST; 
     319      else if (initialEdge.equals("null")) initialEdge = null; 
     320      controls.setEdge(initialEdge); 
    313321 
    314322      // add display controls breakaway window to window manager 
     
    410418    child.setAttribute("name", name); 
    411419    child.setAttribute("threeD", "" + threeD); 
     420    child.setAttribute("edge", "" + 
     421      (controls == null ? initialEdge : controls.getEdge())); 
    412422    viewHandler.saveState(child); 
    413423    captureHandler.saveState(child); 
     
    419429    name = el.getAttribute("name"); 
    420430    threeD = el.getAttribute("threeD").equalsIgnoreCase("true"); 
     431    initialEdge = el.getAttribute("edge"); 
    421432 
    422433    createHandlers(); 
Note: See TracChangeset for help on using the changeset viewer.