Changeset 2868


Ignore:
Timestamp:
06/14/07 09:46:00 (13 years ago)
Author:
sorber
Message:

Moved method "configureOverlay" from OverlayTool to OverlayTransform.

Location:
trunk/loci/visbio/overlays
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/overlays/ArrowTool.java

    r2653 r2868  
    5050    deselectAll(); 
    5151    arrow = new OverlayArrow(overlay, dx, dy, dx, dy); 
    52     configureOverlay(arrow); 
    53     OverlayWidget panel = (OverlayWidget) overlay.getControls(); 
    54     arrow.setFilled(panel.isFilled()); 
    5552    overlay.addObject(arrow, pos); 
    5653  } 
  • trunk/loci/visbio/overlays/BoxTool.java

    r2725 r2868  
    5050    deselectAll(); 
    5151    box = new OverlayBox(overlay, dx, dy, dx, dy); 
    52     configureOverlay(box); 
    53     OverlayWidget panel = (OverlayWidget) overlay.getControls(); 
    54     box.setFilled(panel.isFilled()); 
    5552    overlay.addObject(box, pos); 
    5653  } 
  • trunk/loci/visbio/overlays/FreeformTool.java

    r2865 r2868  
    219219    if (mode == INIT) { 
    220220      freeform = new OverlayFreeform(overlay, downX, downY, downX, downY); 
    221       configureOverlay(freeform); 
    222221      overlay.addObject(freeform, pos); 
    223222      setMode(DRAW); 
     
    503502 
    504503      f1 = new OverlayFreeform(overlay, f1Nodes); 
    505       configureOverlay(f1); 
    506504      overlay.addObject(f1); 
    507505      f1.setSelected(false); 
     
    517515 
    518516      f2 = new OverlayFreeform(overlay, f2Nodes); 
    519       configureOverlay(f2); 
    520517      overlay.addObject(f2); 
    521518      f2.setSelected(false); 
     
    660657    overlay.removeObject(f1); 
    661658    overlay.removeObject(f2); 
    662     configureOverlay(f3); 
    663659    overlay.addObject(f3); 
    664660    freeform = f3; // store the new freeform 
  • trunk/loci/visbio/overlays/LineTool.java

    r2653 r2868  
    5050    deselectAll(); 
    5151    line = new OverlayLine(overlay, dx, dy, dx, dy); 
    52     configureOverlay(line); 
    5352    overlay.addObject(line, pos); 
    5453  } 
  • trunk/loci/visbio/overlays/MarkerTool.java

    r2246 r2868  
    5050    deselectAll(); 
    5151    marker = new OverlayMarker(overlay, dx, dy); 
    52     configureOverlay(marker); 
    5352    overlay.addObject(marker, pos); 
    5453  } 
  • trunk/loci/visbio/overlays/OvalTool.java

    r2653 r2868  
    5050    deselectAll(); 
    5151    oval = new OverlayOval(overlay, dx, dy, dx, dy); 
    52     configureOverlay(oval); 
    53     OverlayWidget panel = (OverlayWidget) overlay.getControls(); 
    54     oval.setFilled(panel.isFilled()); 
    5552    overlay.addObject(oval, pos); 
    5653  } 
  • trunk/loci/visbio/overlays/OverlayTool.java

    r2332 r2868  
    145145  // -- Helper methods -- 
    146146 
    147   /** Configures the given overlay to match the current settings. */ 
    148   protected void configureOverlay(OverlayObject obj) { 
    149     OverlayWidget panel = (OverlayWidget) overlay.getControls(); 
    150     obj.setColor(panel.getActiveColor()); 
    151     obj.setGroup(panel.getActiveGroup()); 
    152     obj.setNotes(panel.getNotes()); 
    153   } 
    154  
    155147  /** Deselect all selected overlays. */ 
    156148  protected void deselectAll() { 
  • trunk/loci/visbio/overlays/OverlayTransform.java

    r2725 r2868  
    155155  /** Adds an overlay object at the given dimensional position. */ 
    156156  public void addObject(OverlayObject obj, int[] pos) { 
     157    configureOverlay(obj); 
    157158    int ndx = FormatTools.positionToRaster(lengths, pos); 
    158159    if (ndx < 0 || ndx >= overlays.length) return; 
     
    890891 
    891892  // -- Helper methods -- 
     893   
     894  /** Configures the given overlay to match the current settings. */ 
     895  protected void configureOverlay(OverlayObject obj) { 
     896    OverlayWidget panel = (OverlayWidget) getControls(); 
     897    obj.setFilled(panel.isFilled()); 
     898    obj.setColor(panel.getActiveColor()); 
     899    obj.setGroup(panel.getActiveGroup()); 
     900    obj.setNotes(panel.getNotes()); 
     901  } 
    892902 
    893903  /** 
  • trunk/loci/visbio/overlays/PolylineTool.java

    r2823 r2868  
    107107        line.setDrawing(true); 
    108108        line.setSelected(true); 
    109         configureOverlay(line); 
    110109        overlay.addObject(line, pos); 
    111110        mode = PLACE; 
     
    411410 
    412411      l1 = new OverlayPolyline(overlay, n1); 
    413       configureOverlay(l1); 
    414412      overlay.addObject(l1); 
    415413      l1.setDrawing(false); 
     
    424422      } 
    425423      l2 = new OverlayPolyline(overlay, n2); 
    426       configureOverlay(l2); 
    427424      overlay.addObject(l2); 
    428425      l2.setDrawing(false); 
  • trunk/loci/visbio/overlays/TextTool.java

    r2246 r2868  
    5151    OverlayWidget controls = (OverlayWidget) overlay.getControls(); 
    5252    text = new OverlayText(overlay, dx, dy, controls.getText()); 
    53     configureOverlay(text); 
    5453    overlay.addObject(text, pos); 
    5554  } 
Note: See TracChangeset for help on using the changeset viewer.