Changeset 1760


Ignore:
Timestamp:
11/08/06 15:18:55 (13 years ago)
Author:
curtis
Message:

Add package statement to CacheIndicator; minor tweaks.

File:
1 edited

Legend:

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

    r1758 r1760  
    2323*/ 
    2424 
     25package loci.plugins.browser; 
     26 
    2527import javax.swing.*; 
    2628import java.awt.*; 
    2729 
    28 public class CacheIndicator extends JComponent 
    29 { 
    30   public static final int COMPONENT_HEIGHT = 3; 
     30public class CacheIndicator extends JComponent { 
     31 
     32  private static final int COMPONENT_HEIGHT = 3; 
     33 
    3134  protected int [] cache,loadList; 
    3235  protected int cacheLength; 
    3336  double ratio; 
    34    
     37 
    3538  public CacheIndicator() { 
    3639    setBackground(Color.white); 
     
    9396    } 
    9497  } 
    95    
     98 
    9699  private int translate(int cacheIndex) { 
    97100    Integer width = new Integer(getWidth()); 
     
    102105    Integer thisIndex = new Integer(cacheIndex); 
    103106    double dIndex = thisIndex.doubleValue(); 
    104      
     107 
    105108    ratio = compSize/cLength; 
    106109    double dPixel = ratio * dIndex; 
    107      
     110 
    108111    Double pixel = new Double(dPixel); 
    109112    return pixel.intValue(); 
     
    113116    return new Dimension(0,COMPONENT_HEIGHT); 
    114117  } 
     118 
    115119} 
Note: See TracChangeset for help on using the changeset viewer.