Changeset 2823


Ignore:
Timestamp:
05/25/07 11:34:09 (13 years ago)
Author:
sorber
Message:

Replaced statistic name strings with constants.
Added separate JFileChooser for opening overlays files.
Removed trailing spaces using FixEOLSpaces.

Location:
trunk/loci/visbio/overlays
Files:
1 deleted
13 edited

Legend:

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

    r2725 r2823  
    3636 
    3737  /** The names of the statistics this object reports */ 
    38   protected static String[] statTypes = {"Tip coordinates", "Angle", 
    39     "Length"}; 
     38  protected static final String TIP = "Tip Coordinates"; 
     39  protected static final String ANGLE = "Angle"; 
     40  protected static final String LENGTH = "Length"; 
     41  protected static final String[] STAT_TYPES = {TIP, ANGLE, LENGTH}; 
    4042 
    4143  // -- Constructors -- 
     
    5860 
    5961  /** Returns the names of the statistics this object reports */ 
    60   public static String[] getStatTypes() {return statTypes;} 
     62  public static String[] getStatTypes() {return STAT_TYPES;} 
    6163 
    6264  // -- OverlayObject API methods -- 
     
    128130  /** Returns a specific statistic of this object */ 
    129131  public String getStat(String name) { 
    130     if (name.equals("Tip coordinates")) { 
     132    if (name.equals(TIP)) { 
    131133      return "(" + x1 + ", " + y1 + ")"; 
    132134    } 
    133     else if (name.equals("Angle")) { 
     135    else if (name.equals(ANGLE)) { 
    134136      return "" + getAngle(); 
    135137    } 
    136     else if (name.equals("Length")) { 
     138    else if (name.equals(LENGTH)) { 
    137139      return "" + getLength(); 
    138140    } 
     
    142144  /** Retrieves useful statistics about this overlay. */ 
    143145  public String getStatistics() { 
    144     return "Arrow tip coordinates = (" + x1 + ", " + y1 + ")\n" + 
    145       "Angle = " + getAngle() + "; Length = " + getLength(); 
    146   } 
    147  
    148   /** Gets this object's statistics in array */ 
    149   public OverlayStat[] getStatisticsArray() { 
    150     float xx = x2 - x1; 
    151     float yy = y2 - y1; 
    152     float angle = (float) (180 * Math.atan(xx / yy) / Math.PI); 
    153     if (yy < 0) angle += 180; 
    154     if (angle < 0) angle += 360; 
    155     float length = (float) Math.sqrt(xx * xx + yy * yy); 
    156  
    157     String coords = "(" + x1 + ", " + y1 + ")"; 
    158     OverlayStat[] stats = { 
    159       new OverlayStat("Tip coordinates", coords), 
    160       new OverlayStat("Angle", "" + angle), 
    161       new OverlayStat("Length", "" + length), 
    162     }; 
    163  
    164     return stats; 
     146    return "Arrow " + TIP + " = (" + x1 + ", " + y1 + ")\n" + 
     147      ANGLE + " = " + getAngle() + "; " + LENGTH + " = " + getLength(); 
    165148  } 
    166149 
  • trunk/loci/visbio/overlays/OverlayBox.java

    r2725 r2823  
    3535 
    3636  /** The names of the statistics this object reports */ 
    37   protected static String[] statTypes =  {"Coordinates", "Center", "Width", 
    38     "Height", "Area", "Perimeter"}; 
     37  protected static final String COORDS = "Coordinates"; 
     38  protected static final String CTR = "Center"; 
     39  protected static final String WD = "Width"; 
     40  protected static final String HT = "Height"; 
     41  protected static final String AREA = "Area"; 
     42  protected static final String PERIM = "Perimeter"; 
     43  protected static final String[] STAT_TYPES =  {COORDS, CTR, WD, HT, AREA, 
     44    PERIM}; 
    3945 
    4046  // -- Constructors -- 
     
    5763 
    5864  /** Returns the names of the statistics this object reports */ 
    59   public static String[] getStatTypes() {return statTypes;} 
     65  public static String[] getStatTypes() {return STAT_TYPES;} 
    6066 
    6167  // -- OverlayObject API methods -- 
     
    140146    float perim = width + width + height + height; 
    141147 
     148<<<<<<< .mine 
     149    if (name.equals(COORDS)) { 
     150      return "(" + x1 + ", " + y1 + ")-(" + x2 + ", " + y2 + ")"; 
     151    } else if (name.equals(CTR)){ 
     152======= 
    142153    if (name.equals("Coordinates")) { 
    143154      return "(" + x1 + ", " + y1 + ")-(" + x2 + ", " + y2 + ")"; 
    144155    } 
    145156    else if (name.equals("Center")) { 
     157>>>>>>> .r2766 
    146158      return "(" + centerX + ", " + centerY + ")"; 
    147159    } 
    148     else if (name.equals("Width")) { 
     160    else if (name.equals(WD)) { 
    149161      return "" + width; 
    150162    } 
    151     else if (name.equals("Height")) { 
     163    else if (name.equals(HT)) { 
    152164      return "" + height; 
    153165    } 
    154     else if (name.equals("Area")) { 
     166    else if (name.equals(AREA)) { 
    155167      return "" + area; 
    156168    } 
    157     else if (name.equals("Perimeter")) { 
     169    else if (name.equals(PERIM)){ 
    158170      return "" + perim; 
    159171    } 
     
    172184    float perim = width + width + height + height; 
    173185 
    174     return "Box coordinates = (" + x1 + ", " + y1 + 
     186    return "Box " + COORDS + " = (" + x1 + ", " + y1 + 
    175187      ")-(" + x2 + ", " + y2 + ")\n" + 
    176       "Center = (" + centerX + ", " + centerY + ")\n" + 
    177       "Width = " + width + "; Height = " + height + "\n" + 
    178       "Area = " + area + "; Perimeter = " + perim; 
     188      CTR + " = (" + centerX + ", " + centerY + ")\n" + 
     189      WD + " = " + width + "; " + HT + " = " + height + "\n" + 
     190      AREA + " = " + area + "; " + PERIM + " = " + perim; 
    179191  } 
    180192 
  • trunk/loci/visbio/overlays/OverlayIO.java

    r2725 r2823  
    438438    Vector[] vectors = {lines, freeforms, markers, texts, ovals, boxes, 
    439439      arrows, polylines}; 
    440     String[] titles = OverlayStat.getOverlayTypes(); 
     440    String[] titles = OverlayUtil.getOverlayTypes(); 
    441441    for (int v=0; v<vectors.length; v++) { 
    442442      if (vectors[v].size() > 0) { 
     
    447447          int index = i + 1; 
    448448          out.println("# " + titles[v] + " " + index); 
    449           String[] stats = OverlayStat.getStatTypes(titles[v]); 
     449          String[] stats = OverlayUtil.getStatTypes(titles[v]); 
    450450          OptionManager om = (OptionManager) 
    451451            VisBioFrame.getVisBio().getManager(OptionManager.class); 
     
    689689    Vector[] vectors = {lines, freeforms, markers, texts, ovals, boxes, 
    690690      arrows, polylines}; 
    691     String[] titles = OverlayStat.getOverlayTypes(); 
     691    String[] titles = OverlayUtil.getOverlayTypes(); 
    692692    for (int v=0; v<vectors.length ; v++) { 
    693693      if (vectors[v].size() > 0) { 
     
    709709          c.setCellValue(new HSSFRichTextString(titles[v] + " " + index)); 
    710710 
    711           String[] statTypes = OverlayStat.getStatTypes(titles[v]); 
     711          String[] statTypes = OverlayUtil.getStatTypes(titles[v]); 
    712712          OptionManager om = (OptionManager) 
    713713            VisBioFrame.getVisBio().getManager(OptionManager.class); 
  • trunk/loci/visbio/overlays/OverlayLine.java

    r2725 r2823  
    3636 
    3737  /** The names of the statistics this object reports */ 
    38   protected static String[] statTypes =  {"Coordinates", "Length"}; 
     38  protected static final String COORDS = "Coordinates"; 
     39  protected static final String LENGTH = "Length"; 
     40  protected static final String[] STAT_TYPES =  {COORDS, LENGTH}; 
    3941 
    4042  // -- Constructors -- 
     
    5759 
    5860  /** Returns the names of the statistics this object reports */ 
    59   public static String[] getStatTypes() {return statTypes;} 
     61  public static String[] getStatTypes() {return STAT_TYPES;} 
    6062 
    6163  // -- OverlayObject API methods -- 
     
    107109  /** Returns a specific statistic of this object */ 
    108110  public String getStat(String name) { 
    109     if (name.equals("Coordinates")) { 
     111    if (name.equals(COORDS)) { 
    110112      return "(" + x1 + ", " + y1 + ")-(" + x2 + ", " + y2 + ")"; 
    111113    } 
    112     else if (name.equals("Length")) { 
     114    else if (name.equals(LENGTH)) { 
    113115      float xx = x2 - x1; 
    114116      float yy = y2 - y1; 
     
    125127    float length = (float) Math.sqrt(xx * xx + yy * yy); 
    126128 
    127     return "Line coordinates = (" + x1 + ", " + y1 + 
     129    return "Line " + COORDS + " = (" + x1 + ", " + y1 + 
    128130      ")-(" + x2 + ", " + y2 + ")\n" + 
    129       "Length = " + length; 
     131      LENGTH + " = " + length; 
    130132  } 
    131133 
  • trunk/loci/visbio/overlays/OverlayManager.java

    r2653 r2823  
    6262    // register Overlay options 
    6363    OptionManager om = (OptionManager) bio.getManager(OptionManager.class); 
    64     String[] overlayTypes = OverlayStat.getOverlayTypes(); 
     64    String[] overlayTypes = OverlayUtil.getOverlayTypes(); 
    6565    for (int i=0; i<overlayTypes.length; i++) { 
    66       String[] statTypes = OverlayStat.getStatTypes(overlayTypes[i]); 
     66      String[] statTypes = OverlayUtil.getStatTypes(overlayTypes[i]); 
    6767      for (int j=0; j<statTypes.length; j++) { 
    6868        String name = overlayTypes[i] + "." + statTypes[j]; 
  • trunk/loci/visbio/overlays/OverlayMarker.java

    r2725 r2823  
    3535 
    3636  /** The names of the statistics this object reports */ 
    37   protected static String[] statTypes =  {"Coordinates"}; 
     37  protected static final String COORDS = "Coordinates"; 
     38  protected static final String[] STAT_TYPES =  {COORDS}; 
    3839 
    3940  // -- Constructors -- 
     
    5253 
    5354  /** Returns the names of the statistics this object reports */ 
    54   public static String[] getStatTypes() {return statTypes;} 
     55  public static String[] getStatTypes() {return STAT_TYPES;} 
    5556 
    5657  // -- OverlayObject API methods -- 
     
    104105  /** Returns a specific statistic of this object*/ 
    105106  public String getStat(String name) { 
    106     if (name.equals("Coordinates")) { 
     107    if (name.equals(COORDS)) { 
    107108      return "(" + x1 + ", " + y1 + ")"; 
    108109    } 
     
    112113  /** Retrieves useful statistics about this overlay. */ 
    113114  public String getStatistics() { 
    114     return "Marker coordinates = (" + x1 + ", " + y1 + ")"; 
     115    return "Marker " + COORDS + " = (" + x1 + ", " + y1 + ")"; 
    115116  } 
    116117 
  • trunk/loci/visbio/overlays/OverlayNodedObject.java

    r2725 r2823  
     1<<<<<<< .mine 
    12// 
    23// OverlayNodedObject.java 
     
    4142 
    4243  /** The names of the statistics this object reports */ 
    43   protected static String[] statTypes =  {"Bounds", "Nodes", 
    44     "Length"}; 
     44  protected static final String BOUNDS = "Bounds"; 
     45  protected static final String NODES = "Number of Nodes"; 
     46  protected static final String LENGTH = "Length"; 
     47  protected static final String[] STAT_TYPES =  {BOUNDS, NODES, LENGTH}; 
    4548 
    4649  // -- Constants -- 
     
    146149 
    147150  /** Returns the names of the statistics this object reports */ 
    148   public static String[] getStatTypes() { return statTypes; } 
     151  public static String[] getStatTypes() { return STAT_TYPES; } 
    149152 
    150153  // -- OverlayObject API methods -- 
     
    221224    return field; 
    222225  } 
     226 
    223227  /** 
    224228   * Computes the shortest distance from this 
     
    243247  /** Returns a specific statistic of this object */ 
    244248  public String getStat(String name) { 
    245     if (name.equals("Bounds")) { 
     249    if (name.equals(BOUNDS)) { 
    246250      return "(" + x1 + ", " + y1 + "), (" + x2 + ", " + y2 + ")"; 
    247251    } 
    248     else if (name.equals("Nodes")) { 
     252    else if (name.equals(NODES)) { 
    249253      return "" + numNodes; 
    250254    } 
    251     else if (name.equals("Length")) { 
     255    else if (name.equals(LENGTH)) { 
    252256      return "" + (float) curveLength; 
    253257    } 
     
    257261  /** Retrieves useful statistics about this overlay. */ 
    258262  public String getStatistics() { 
    259     return "Bounds = (" + x1 + ", " + y1 + "), (" + x2 + ", " + y2 + ")\n" + 
    260       "Number of Nodes = " + numNodes + "\n" + 
    261       "Curve Length = " + (float) curveLength + "\n"; 
     263    return BOUNDS + " = (" + x1 + ", " + y1 + "), (" + x2 + ", " + y2 + ")\n" + 
     264      NODES +" = " + numNodes + "\n" + 
     265      LENGTH + " = " + (float) curveLength + "\n"; 
    262266  } 
    263267 
  • trunk/loci/visbio/overlays/OverlayOval.java

    r2725 r2823  
    3535 
    3636  /** The names of the statistics this object reports */ 
    37   protected static String[] statTypes =  {"Coordinates", "Center", "Radius", 
    38     "Major Axis Length", "Minor Axis Length", "Area", "Eccentricity", 
    39     "Circumference (approximate)"}; 
     37  public static final String COORDS = "Coordinates"; 
     38  public static final String CTR = "Center"; 
     39  public static final String RAD = "Radius"; 
     40  public static final String MAJ = "Major Axis Length"; 
     41  public static final String MIN = "Minor Axis Length"; 
     42  public static final String AREA = "Area"; 
     43  public static final String ECC = "Eccentricity"; 
     44  public static final String CIRC = "Circumference (approximate)"; 
     45  protected static final String[] STAT_TYPES =  {COORDS, CTR, RAD, MAJ, MIN, 
     46    AREA, ECC, CIRC}; 
    4047 
    4148  // -- Constants -- 
     
    9097 
    9198  /** Returns the names of the statistics this object reports */ 
    92   public static String[] getStatTypes() { return statTypes; } 
     99  public static String[] getStatTypes() { return STAT_TYPES; } 
    93100 
    94101  // -- OverlayObject API methods -- 
     
    202209      (major + minor) * (1 + q / (10 + Math.sqrt(4 - q)))); 
    203210 
    204     if (name.equals("Coordinates")) { 
     211    if (name.equals(COORDS)) { 
    205212      return "(" + x1 + ", " + y1 + ")-(" + x2 + ", " + y2 + ")"; 
    206213    } 
    207     else if (name.equals("Center")) { 
     214    else if (name.equals(CTR)) { 
    208215      return "(" + centerX + ", " + centerY + ")"; 
    209216    } 
    210     else if (name.equals("Radius")) { 
     217    else if (name.equals(RAD)) { 
    211218      return "(" + radiusX + ", " + radiusY + ")"; 
    212219    } 
    213     else if (name.equals("Major Axis Length")) { 
     220    else if (name.equals(MAJ)) { 
    214221      return "" + major; 
    215222    } 
    216     else if (name.equals("Minor Axis Length")) { 
     223    else if (name.equals(MIN)) { 
    217224      return "" + minor; 
    218225    } 
    219     else if (name.equals("Area")) { 
     226    else if (name.equals(AREA)) { 
    220227      return "" + area; 
    221228    } 
    222     else if (name.equals("Eccentricity")) { 
     229    else if (name.equals(ECC)) { 
    223230      return "" + eccen; 
    224231    } 
    225     else if (name.equals("Circumference (approximate)")) { 
     232    else if (name.equals(CIRC)) { 
    226233      return "" + circum; 
    227234    } 
     
    256263      (major + minor) * (1 + q / (10 + Math.sqrt(4 - q)))); 
    257264 
    258     return "Oval coordinates = (" + x1 + ", " + y1 + 
    259       ")-(" + x2 + ", " + y2 + ")\n" + 
    260       "Center = (" + centerX + ", " + centerY + "), " + 
    261       "Radius = (" + radiusX + ", " + radiusY + ")\n" + 
    262       "Major = " + major + "; Minor = " + minor + "\n" + 
    263       "Area = " + area + "; Eccentricity = " + eccen + "\n" + 
    264       "Circumference = " + circum + " (approximate)"; 
    265   } 
    266  
    267   /** Gets this object's statistics in array */ 
    268   public OverlayStat[] getStatisticsArray() { 
    269     float xx = x2 - x1; 
    270     float yy = y2 - y1; 
    271     float centerX = x1 + xx / 2; 
    272     float centerY = y1 + yy / 2; 
    273     float radiusX = (xx < 0 ? -xx : xx) / 2; 
    274     float radiusY = (yy < 0 ? -yy : yy) / 2; 
    275     float major, minor; 
    276     if (radiusX > radiusY) { 
    277       major = radiusX; 
    278       minor = radiusY; 
    279     } 
    280     else { 
    281       major = radiusY; 
    282       minor = radiusX; 
    283     } 
    284     float eccen = (float) Math.sqrt(1 - (minor * minor) / (major * major)); 
    285     float area = (float) (Math.PI * major * minor); 
    286  
    287     // ellipse circumference approximation algorithm due to Ramanujan found at 
    288     // http://mathforum.org/dr.math/faq/formulas/faq.ellipse.circumference.html 
    289     float mm = (major - minor) / (major + minor); 
    290     float q = 3 * mm * mm; 
    291     float circum = (float) (Math.PI * 
    292       (major + minor) * (1 + q / (10 + Math.sqrt(4 - q)))); 
    293  
    294     String coords = "(" + x1 + ", " + y1 + ")"; 
    295     OverlayStat[] stats = { 
    296       new OverlayStat("Coordinates", coords), 
    297       new OverlayStat("Center", "(" + centerX + ", " + centerY + ")"), 
    298       new OverlayStat("Radius", "(" + radiusX + ", " + radiusY + ")"), 
    299       new OverlayStat("Major Axis Length", "" + major), 
    300       new OverlayStat("Minor Axis Length", "" + minor), 
    301       new OverlayStat("Area", "" + area), 
    302       new OverlayStat("Eccentricity", "" + eccen), 
    303       new OverlayStat("Circumference (approximate)", "" + circum) 
    304     }; 
    305     return stats; 
     265    return "Oval " + COORDS + " = (" + x1 + ", " + y1 + "), " + 
     266      CTR + " = (" + centerX + ", " + centerY + "), " + 
     267      RAD + " = (" + radiusX + ", " + radiusY + ")\n" + 
     268      MAJ + " = " + major + "; " + MIN + " = " + minor + "\n" + 
     269      AREA + " = " + area + "; " + ECC + " = " + eccen + "\n" + 
     270      CIRC + " = " + circum; 
    306271  } 
    307272 
  • trunk/loci/visbio/overlays/OverlayText.java

    r2725 r2823  
    3434 
    3535  /** The names of the statistics this object reports */ 
    36   protected static String[] statTypes =  {"Coordinates"}; 
     36  protected static final String COORDS = "Coordinates"; 
     37  protected static final String[] STAT_TYPES = {COORDS}; 
    3738 
    3839  // -- Constructors -- 
     
    5859 
    5960  /** Returns the names of the statistics this object reports */ 
    60   public static String[] getStatTypes() {return statTypes;} 
     61  public static String[] getStatTypes() {return STAT_TYPES;} 
    6162 
    6263  // -- OverlayText API methods -- 
     
    123124  /** Returns a specific statistic of this object */ 
    124125  public String getStat(String name) { 
    125     if (name.equals("Coordinates")) { 
     126    if (name.equals(COORDS)) { 
    126127      return "(" + x1 + ", " + y1 + ")"; 
    127128    } 
     
    131132  /** Retrieves useful statistics about this overlay. */ 
    132133  public String getStatistics() { 
    133     return "Text coordinates = (" + x1 + ", " + y1 + ")"; 
     134    return "Text " + COORDS + " = (" + x1 + ", " + y1 + ")"; 
    134135  } 
    135136 
  • trunk/loci/visbio/overlays/OverlayUtil.java

    r2725 r2823  
    8585  } 
    8686 
     87  /** List of all OverlayObject subclasses */ 
     88  public static final String[] OVERLAY_TYPES = 
     89    {"Line", "Freeform", "Marker", "Text", 
     90    "Oval", "Box", "Arrow", "Polyline"}; 
     91 
    8792  // -- Constructor -- 
    8893  private OverlayUtil() { } 
     94 
     95  // -- Statistics Utility Methods -- 
     96 
     97  /** Get list of all OverlayObject subclasses */ 
     98  public static String[] getOverlayTypes() { return OVERLAY_TYPES; } 
     99 
     100  /** 
     101   * Returns statistic names for a particular class 
     102   */ 
     103  protected static String[] getStatTypes(String overlayType) { 
     104    String[] statTypes = null; 
     105    if (overlayType.equals("Arrow")) statTypes = 
     106      OverlayArrow.getStatTypes(); 
     107    else if (overlayType.equals("Box")) statTypes = 
     108      OverlayBox.getStatTypes(); 
     109    else if (overlayType.equals("Freeform")) statTypes = 
     110      OverlayFreeform.getStatTypes(); 
     111    else if (overlayType.equals("Line")) statTypes = 
     112      OverlayLine.getStatTypes(); 
     113    else if (overlayType.equals("Marker")) statTypes = 
     114      OverlayMarker.getStatTypes(); 
     115    else if (overlayType.equals("Oval")) statTypes = 
     116      OverlayOval.getStatTypes(); 
     117    else if (overlayType.equals("Polyline"))statTypes = 
     118      OverlayPolyline.getStatTypes(); 
     119    else if (overlayType.equals("Text")) statTypes = 
     120      OverlayText.getStatTypes(); 
     121    return statTypes; 
     122  } 
    89123 
    90124  // -- Selection Layer Utility Methods -- 
  • trunk/loci/visbio/overlays/OverlayWidget.java

    r2725 r2823  
    7676  // -- GUI components - global -- 
    7777 
    78   /** File chooser for loading and saving overlays. */ 
    79   protected JFileChooser overlayBox; 
     78  /** File chooser for saving overlays. */ 
     79  protected JFileChooser overlaySaveBox; 
     80 
     81  /** File chooser for loading overlays. */ 
     82  protected JFileChooser overlayLoadBox; 
    8083 
    8184  /** File chooser for exporting overlays to .xls */ 
     
    173176    JPanel toolsRow = FormsUtil.makeRow(buttonList); 
    174177 
    175     // file chooser for loading and saving overlays 
    176     overlayBox = new JFileChooser(); 
    177     overlayBox.addChoosableFileFilter(new ExtensionFileFilter( 
     178    // file chooser for loading overlays 
     179    overlayLoadBox= new JFileChooser(); 
     180    overlayLoadBox.addChoosableFileFilter(new ExtensionFileFilter( 
    178181      new String[] {"txt"}, "Overlay text files")); 
    179     overlayBox.setAccessory(new StatsOptionsPane()); 
     182 
     183    // file chooser for saving overlays 
     184    overlaySaveBox = new JFileChooser(); 
     185    overlaySaveBox.addChoosableFileFilter(new ExtensionFileFilter( 
     186      new String[] {"txt"}, "Overlay text files")); 
     187    overlaySaveBox.setAccessory(new StatsOptionsPane()); 
    180188 
    181189    overlayXLSBox = new JFileChooser(); 
     
    656664    } 
    657665    else if (src == load) { 
    658       int rval = overlayBox.showOpenDialog(this); 
     666      int rval = overlayLoadBox.showOpenDialog(this); 
    659667      if (rval != JFileChooser.APPROVE_OPTION) return; 
    660       File file = overlayBox.getSelectedFile(); 
     668      File file = overlayLoadBox.getSelectedFile(); 
    661669      try { 
    662670        BufferedReader fin = new BufferedReader(new FileReader(file)); 
     
    671679    } 
    672680    else if (src == save) { 
    673       StatsOptionsPane statsPane = (StatsOptionsPane) overlayBox.getAccessory(); 
     681      StatsOptionsPane statsPane = (StatsOptionsPane) overlaySaveBox.getAccessory(); 
    674682      statsPane.loadSettings(); 
    675       int rval = overlayBox.showSaveDialog(this); 
     683      int rval = overlaySaveBox.showSaveDialog(this); 
    676684      if (rval != JFileChooser.APPROVE_OPTION) return; 
    677       File file = overlayBox.getSelectedFile(); 
     685      File file = overlaySaveBox.getSelectedFile(); 
    678686      statsPane.saveSettings(); 
    679687      try { 
  • trunk/loci/visbio/overlays/PolylineTool.java

    r2725 r2823  
    305305        // determine if near head 
    306306        double hdist = getDistanceToNode(0, px, py, display); 
     307 
    307308        // determine if near last node placed 
    308309        double ldist = 
     
    336337        // determine if near head 
    337338        double hdist = getDistanceToNode(0, px, py, display); 
     339 
    338340        // determine if near last node placed 
    339341        double ldist = 
  • trunk/loci/visbio/overlays/StatsOptionsPane.java

    r2725 r2823  
    7373      VisBioFrame.getVisBio().getManager(OptionManager.class); 
    7474 
    75     String[] overlayTypes = OverlayStat.getOverlayTypes(); 
    76     for (int type=0; type<overlayTypes.length; type++) { 
    77       String statTypes[] = OverlayStat.getStatTypes(overlayTypes[type]); 
     75    String[] overlayTypes = OverlayUtil.getOverlayTypes(); 
     76 
     77    for (int type=0; type<overlayTypes.length; type++) { 
     78      String statTypes[] = OverlayUtil.getStatTypes(overlayTypes[type]); 
    7879      for (int i=0; i<statTypes.length; i++) { 
    7980        String name = overlayTypes[type] + "." + statTypes[i]; 
     
    9091    OptionManager om = (OptionManager) 
    9192      VisBioFrame.getVisBio().getManager(OptionManager.class); 
    92  
    93     String[] overlayTypes = OverlayStat.getOverlayTypes(); 
    94  
    95     for (int type=0; type<overlayTypes.length; type++) { 
    96       String statTypes[] = OverlayStat.getStatTypes(overlayTypes[type]); 
     93    String[] overlayTypes = OverlayUtil.getOverlayTypes(); 
     94 
     95    for (int type=0; type<overlayTypes.length; type++) { 
     96      String statTypes[] = OverlayUtil.getStatTypes(overlayTypes[type]); 
    9797      for (int i=0; i<statTypes.length; i++) { 
    9898        String name = overlayTypes[type] + "." + statTypes[i]; 
     
    119119      VisBioFrame.getVisBio().getManager(OptionManager.class); 
    120120 
    121     String[] overlayTypes = OverlayStat.getOverlayTypes(); 
     121    String[] overlayTypes = OverlayUtil.getOverlayTypes(); 
    122122    checkBoxes = new JCheckBox[overlayTypes.length][]; 
    123123 
    124124    // populate checkbox array 
    125125    for (int type=0; type<overlayTypes.length; type++) { 
    126       String statTypes[] = OverlayStat.getStatTypes(overlayTypes[type]); 
     126      String statTypes[] = OverlayUtil.getStatTypes(overlayTypes[type]); 
    127127      checkBoxes[type] = new JCheckBox[statTypes.length]; 
    128128      for (int i=0; i<statTypes.length; i++) { 
Note: See TracChangeset for help on using the changeset viewer.