Ignore:
Timestamp:
02/03/12 20:22:06 (8 years ago)
Author:
aivar
Message:

SLIMPlugin: Tidied up a bit. Fixed minor bugs in decay graph, histogram, and user interface panel.

Location:
trunk/projects/slim-plugin/src/main/java/loci/slim
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/slim-plugin/src/main/java/loci/slim/refactor/ui/charts/DecayGraph.java

    r7804 r7886  
    276276        decayRenderer.setSeriesLinesVisible(2, false); 
    277277        decayRenderer.setSeriesShape 
    278                 (2, new Ellipse2D.Float(2.0f, 2.0f, 2.0f, 2.0f)); 
     278                (2, new Ellipse2D.Float(-1.0f, -1.0f, 2.0f, 2.0f)); 
    279279 
    280280        decayRenderer.setSeriesPaint(0, IRF_COLOR); 
  • trunk/projects/slim-plugin/src/main/java/loci/slim/ui/UserInterfacePanel.java

    r7875 r7886  
    8686    private static final Character SUB_3  = '\u2083'; 
    8787     
    88     private static final String SUM_REGION = "Sum All"; 
     88    private static final String SUM_REGION = "Sum All Pixels"; 
    8989    private static final String ROIS_REGION = "Sum Each ROI"; 
    9090    private static final String PIXEL_REGION = "Single Pixel"; 
    91     private static final String ALL_REGION = "Each Pixel"; 
     91    private static final String ALL_REGION = "Image"; 
    9292     
    9393    private static final String JAOLHO_LMA_ALGORITHM = "Jaolho LMA"; 
     
    111111    private static final String EXCITATION_FILE = "Load from File"; 
    112112    private static final String EXCITATION_CREATE = "Use current X Y"; 
    113      
    114     private static final String MAKE_IMAGES = "Make Images"; 
     113 
     114    private static final String FIT_IMAGE = "Fit Image"; 
     115    private static final String FIT_PIXEL = "Fit Pixel"; 
     116    private static final String FIT_SUMMED_PIXELS = "Fit Summed Pixels"; 
     117    private static final String FIT_SUMMED_ROIS = "Fit Summed ROIs"; 
    115118    private static final String CANCEL_IMAGES = "Cancel Images"; 
    116119 
     
    230233    JButton m_quitButton; 
    231234    JButton m_fitButton; 
     235    String m_fitButtonText = FIT_IMAGE; 
    232236 
    233237    public UserInterfacePanel(boolean showTau, String[] analysisChoices, String[] binningChoices) { 
     
    280284        buttonPanel.add(m_quitButton); 
    281285        buttonPanel.add(Box.createRigidArea(new Dimension(10, 0))); 
    282         m_fitButton = new JButton(MAKE_IMAGES); 
     286        m_fitButton = new JButton(m_fitButtonText); 
    283287        m_fitButton.addActionListener( 
    284288            new ActionListener() { 
    285289                public void actionPerformed(ActionEvent e) { 
    286290                    String text = (String)e.getActionCommand(); 
    287                     if (text.equals(MAKE_IMAGES)) { 
     291                    if (text.equals(m_fitButtonText)) { 
    288292                        enableAll(false); 
    289293                        setFitButtonState(false); 
     
    347351        m_regionComboBox = new JComboBox(REGION_ITEMS); 
    348352        m_regionComboBox.setSelectedItem(ALL_REGION); 
     353        m_regionComboBox.addItemListener( 
     354            new ItemListener() { 
     355                public void itemStateChanged(ItemEvent e) { 
     356                    if (e.getStateChange() == ItemEvent.SELECTED) { 
     357                        String item = (String) e.getItem(); 
     358                        if (SUM_REGION == item) { 
     359                            m_fitButtonText = FIT_SUMMED_PIXELS; 
     360                        } 
     361                        else if (ROIS_REGION == item) { 
     362                            m_fitButtonText = FIT_SUMMED_ROIS; 
     363                        } 
     364                        else if (PIXEL_REGION == item) { 
     365                            m_fitButtonText = FIT_PIXEL; 
     366                        } 
     367                        else if (ALL_REGION == item) { 
     368                            m_fitButtonText = FIT_IMAGE; 
     369                        } 
     370                        m_fitButton.setText(m_fitButtonText); 
     371                    } 
     372                } 
     373            } 
     374        ); 
    349375        fitPanel.add(m_regionComboBox); 
    350376 
     
    913939     
    914940    private void setFitButtonState(boolean on) { 
    915         m_fitButton.setText(on ? MAKE_IMAGES : CANCEL_IMAGES); 
     941        m_fitButton.setText(on ? m_fitButtonText : CANCEL_IMAGES); 
    916942    } 
    917943     
    918944    private boolean getFitButtonState() { 
    919         return m_fitButton.getText().equals(MAKE_IMAGES); 
     945        return m_fitButton.getText().equals(m_fitButtonText); 
    920946    } 
    921947 
Note: See TracChangeset for help on using the changeset viewer.