Changeset 4245


Ignore:
Timestamp:
07/23/08 16:22:28 (12 years ago)
Author:
curtis
Message:
  • Better per-pixel lifetime progress bar.
  • Allow specification of non-integer min/max range.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/slim/TwoDPane.java

    r4243 r4245  
    357357      int curProg = curveRenderers[c].getCurrentProgress(); 
    358358      int maxProg = curveRenderers[c].getMaxProgress(); 
    359       int curIter = curveRenderers[c].getCurrentIterations(); 
    360       int maxIter = curveRenderers[c].getMaxIterations(); 
    361       int subLevel = curveRenderers[c].getSubsampleLevel(); 
    362359      progress.setMaximum(maxProg); 
    363360      progress.setValue(curProg); 
    364       progress.setString(curProg == maxProg ? 
    365         "Iteration " + curIter + "/" + maxIter : 
    366         "Estimating; " + subLevel + " steps until total burn-in"); 
     361      if (curProg == maxProg) { 
     362        int totalIter = curveRenderers[c].getTotalIterations(); 
     363        progress.setString("Improving image: iteration #" + totalIter); 
     364      } 
     365      else { 
     366        int subLevel = curveRenderers[c].getSubsampleLevel(); 
     367        if (subLevel < 0) { 
     368          int curIter = curveRenderers[c].getCurrentIterations(); 
     369          int maxIter = curveRenderers[c].getMaxIterations(); 
     370          progress.setString("Iteration " + curIter + "/" + maxIter); 
     371        } 
     372        else { 
     373          progress.setString("Estimating; " + (subLevel + 1) + 
     374            " step" + (subLevel > 0 ? "s" : "") + " until total burn-in"); 
     375        } 
     376      } 
    367377 
    368378      if (lifetimeMode.isSelected()) { 
     
    488498 
    489499  private void rescaleMinMax() { 
    490     int min = 0, max = 0; 
     500    double min = 0, max = 0; 
    491501    boolean validRange = true; 
    492502    try { 
    493       min = Integer.parseInt(minField.getText()); 
     503      min = Double.parseDouble(minField.getText()); 
    494504      minField.setBackground(validColor); 
    495505    } 
     
    499509    } 
    500510    try { 
    501       max = Integer.parseInt(maxField.getText()); 
     511      max = Double.parseDouble(maxField.getText()); 
    502512      maxField.setBackground(validColor); 
    503513    } 
Note: See TracChangeset for help on using the changeset viewer.