Changeset 7188


Ignore:
Timestamp:
11/12/10 21:02:27 (9 years ago)
Author:
aivar
Message:

Dynamically sets minimum, as well as maximum. TIdied up code & added comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/maven/projects/slim-plugin/src/main/java/loci/slim/colorizer/ColorBar.java

    r7060 r7188  
    4141 
    4242/** 
    43  * Displays a color bar (typically under the histogram) with the 
    44  * current colorization scheme. 
    45  * 
    46  * <dl><dt><b>Source code:</b></dt> 
    47  * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/projects/slim-plugin/src/main/java/loci/colorizer/ColorBar.java">Trac</a>, 
    48  * <a href="http://dev.loci.wisc.edu/svn/java/trunk/projects/slim-plugin/src/main/java/loci/colorizer/ColorBar.java">SVN</a></dd></dl> 
     43 * Displays a color bar with the current colorization scheme.  Live, 
     44 * reflects ongoing changes. 
    4945 * 
    5046 * @author Aivar Grislis grislis at wisc.edu 
     
    5753    double m_start; 
    5854    double m_stop; 
     55    double m_min; 
    5956    double m_max; 
    6057 
     
    7471        setPreferredSize(new Dimension(width, height)); 
    7572 
    76         m_start = m_stop = m_max = 0.0; 
     73        m_start = m_stop = m_min = m_max = 0.0; 
    7774    } 
    7875 
     
    9592     * @param start 
    9693     * @param stop 
     94     * @param min 
    9795     * @param max 
    9896     */ 
    99     public void setRange(boolean auto, double start, double stop, double max) { 
     97    public void setRange(boolean auto, double start, double stop, double min, double max) { 
    10098        boolean changed = false; 
    10199        synchronized (m_synchObject) { 
     
    106104            if (stop != m_stop) { 
    107105                m_stop = stop; 
     106                changed = true; 
     107            } 
     108            if (min != m_min) { 
     109                m_min = min; 
    108110                changed = true; 
    109111            } 
Note: See TracChangeset for help on using the changeset viewer.