Changeset 7135


Ignore:
Timestamp:
10/25/10 22:32:16 (9 years ago)
Author:
aivar
Message:

Added 'quit' method to make the UI go away when the user cancels a fit.

File:
1 edited

Legend:

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

    r7060 r7135  
    7878public class DataColorizerUI implements IColorizeRangeListener { 
    7979    Object m_synchObject = new Object(); 
     80    JFrame m_frame; 
    8081    IColorizeRangeListener m_listener; 
    8182    Histogram m_histogram; 
     
    9798        m_inputPanel = new InputPanel(this); 
    9899 
    99         JFrame frame = new JFrame("Colorize"); 
    100         frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE); 
    101         frame.setResizable(false); 
    102         frame.getContentPane().add(m_histogram, BorderLayout.NORTH); 
    103         frame.getContentPane().add(m_colorBar, BorderLayout.CENTER); 
    104         frame.getContentPane().add(m_inputPanel, BorderLayout.SOUTH); 
    105         frame.pack(); 
    106         frame.setVisible(true); 
     100        m_frame = new JFrame("Colorize"); 
     101        m_frame.setDefaultCloseOperation(m_frame.EXIT_ON_CLOSE); 
     102        m_frame.setResizable(false); 
     103        m_frame.getContentPane().add(m_histogram, BorderLayout.NORTH); 
     104        m_frame.getContentPane().add(m_colorBar, BorderLayout.CENTER); 
     105        m_frame.getContentPane().add(m_inputPanel, BorderLayout.SOUTH); 
     106        m_frame.pack(); 
     107        m_frame.setVisible(true); 
    107108    } 
    108109 
     
    133134        } 
    134135    } 
     136 
     137    public void quit() { 
     138        m_frame.dispose(); //TODO ? what should I call here 
     139    } 
    135140} 
Note: See TracChangeset for help on using the changeset viewer.