Changeset 7191


Ignore:
Timestamp:
11/12/10 21:02:59 (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/Histogram.java

    r7060 r7191  
    6363    private double m_start; 
    6464    private double m_stop; 
     65    private double m_min; 
    6566    private double m_max; 
    6667 
     
    8182 
    8283        m_auto = true; 
    83         m_start = m_stop = m_max = 0.0; 
     84        m_start = m_stop = m_min = m_max = 0.0; 
    8485 
    8586        m_count = new int[width]; 
     
    184185     * 
    185186     * @param lifetime 
     187     * @param min 
    186188     * @param max 
    187189     */ 
    188     void updateData(double lifetime[], double max) { 
     190    void updateData(double lifetime[], double min, double max) { 
    189191        //System.out.println("Histogram.updateData max is " + max); 
    190192        synchronized (m_synchObject) { 
     
    207209            } 
    208210 
     211            m_min = min; 
    209212            m_max = max; 
    210213            if (m_auto) { 
     214                m_start = min; 
    211215                m_stop = max; 
    212216            } 
     
    223227     * @param stop 
    224228     */ 
    225     public void setRange(boolean auto, double start, double stop, double max) { 
     229    public void setRange(boolean auto, double start, double stop, double min, double max) { 
    226230        boolean redraw = false; 
    227231        synchronized (m_synchObject) { 
     
    235239                redraw = true; 
    236240            } 
     241            m_min = min; 
    237242            m_max = max; 
    238243        } 
Note: See TracChangeset for help on using the changeset viewer.