Changeset 1791


Ignore:
Timestamp:
11/14/06 18:33:04 (13 years ago)
Author:
chris
Message:

browser:
1) fixed minor length bug in cache indicator. now
the axis size -1 paints to the end of the indicator
bar as it should
2) fixed huge glaring error in how CacheManager
cleared the cache... needed to set the old sizes,
axes, mode, priorities to the current ones after
they're changed at runtime.
3) The indicator and the cache and the options
window should be good to go now. No unecessary out
of memory errors, no wierd indicator all over the
place and no interference from runtime changes through
options window with the behavior of the cache.

Location:
trunk/loci/plugins/browser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/browser/CacheIndicator.java

    r1790 r1791  
    4949    cache = someCache; 
    5050    loadList = someLoadList; 
    51     cacheLength = length; 
     51    cacheLength = length - 1; 
    5252    int setRatio = translate(0); 
    5353    repaint(); 
     
    7777        } 
    7878        else { 
    79           prevLoad = prevLoad + 2; 
     79          prevLoad = prevLoad + 1; 
    8080          int x = translate(startLoad); 
    8181          int wid = translate(prevLoad) - x; 
     
    9999        } 
    100100        else { 
    101           prevLoad = prevLoad + 2; 
     101          prevLoad = prevLoad + 1; 
    102102          int x = translate(startLoad); 
    103103          int wid = translate(prevLoad) - x; 
     
    109109  } 
    110110 
    111   private int translate(int cacheIndex) { 
     111  private int translate(int cacheIndex) {  
    112112    Integer width = new Integer(scroll.getWidth()); 
    113113    double compSize = width.doubleValue(); 
  • trunk/loci/plugins/browser/CacheManager.java

    r1790 r1791  
    18001800 
    18011801    int[] oldIndex = getToCache(true); 
     1802     
    18021803    oldZ = curZ; 
    18031804    oldT = curT; 
    18041805    oldC = curC; 
     1806 
     1807    oldStrategy = strategy; 
     1808    oldMode = curMode; 
     1809    oldAxis = curAxis; 
     1810     
     1811    oldBackZ = curBackZ; 
     1812    oldBackT = curBackT; 
     1813    oldBackC = curBackC; 
     1814    oldForwardZ = curForwardZ; 
     1815    oldForwardT = curForwardT; 
     1816    oldForwardC = curForwardC; 
     1817     
     1818    oldZPriority = curZPriority; 
     1819    oldTPriority = curZPriority; 
     1820    oldCPriority = curCPriority; 
     1821     
    18051822    int[] newIndex = getToCache(false); 
    18061823 
     
    18191836          } 
    18201837          System.out.println("}"); 
     1838          System.out.println("oldBackZ = " + oldBackZ + "; oldForwardZ = " + 
     1839            oldForwardZ + "; oldBackT = " + oldBackT + "; oldForwardT = " + 
     1840            oldForwardT + "; oldBackC = " + oldBackC + "; oldForwardC = " + 
     1841            oldForwardC); 
     1842          System.out.println("curBackZ = " + curBackZ + "; curForwardZ = " + 
     1843            curForwardZ + "; curBackT = " + curBackT + "; curForwardT = " + 
     1844            curForwardT + "; curBackC = " + curBackC + "; curForwardC = " + 
     1845            curForwardC); 
    18211846    } 
    18221847 
     
    18871912    int[] tL = makeInt(tLoad.toArray()); 
    18881913     
    1889     if(DEBUG) { 
    1890       System.out.println(zInCache); 
    1891       System.out.println(tInCache); 
    1892       System.out.println(zLoad); 
    1893       System.out.println(tLoad); 
    1894     } 
    1895      
    18961914    Arrays.sort(zL); 
    18971915    Arrays.sort(tL); 
  • trunk/loci/plugins/browser/OptionsWindow.java

    r1790 r1791  
    8585    manager = cw.db.manager; 
    8686 
    87     update = true; 
     87    update = false; 
    8888 
    8989    Border etchB = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED); 
     
    315315    pack(); 
    316316    setVisible(true); 
     317     
     318    update = true; 
    317319  } 
    318320 
     
    358360 
    359361  public void actionPerformed(ActionEvent e) { 
    360 ///* 
    361362    if(update) { 
    362363      Object source = e.getSource(); 
     
    471472      } 
    472473    } 
    473 //*/ 
    474474  } 
    475475 
    476476  public void itemStateChanged(ItemEvent e) { 
    477 ///* 
    478477    if(update) { 
    479478      Object source = e.getItemSelectable(); 
     
    514513      manager.setAxis(finalState); 
    515514    } 
    516 //*/ 
    517515  } 
    518516 
     
    520518 
    521519  public void stateChanged(ChangeEvent e) { 
    522 ///* 
    523520    if(update) { 
    524521      if (e.getSource() == fps) { 
     
    537534      } 
    538535    } 
    539 //*/ 
    540536  } 
    541537} 
Note: See TracChangeset for help on using the changeset viewer.