View Javadoc
1   package com.github.celldynamics.quimp.plugin.protanalysis;
2   
3   import java.awt.event.ActionEvent;
4   
5   import javax.swing.JToggleButton;
6   
7   /**
8    * Set mode for {@link CustomCanvas} to get reference point only.
9    * 
10   * <p>Mode is reseted by {@link CustomCanvas#mousePressed(java.awt.event.MouseEvent)}
11   * 
12   * @author p.baniukiewicz
13   *
14   */
15  @SuppressWarnings("serial")
16  public class ActionClickPredefinedPoint extends ProtAnalysisAbstractAction {
17  
18    /**
19     * Action creator.
20     * 
21     * @param name name
22     * @param desc description
23     * @param ui reference to outer class.
24     */
25    public ActionClickPredefinedPoint(String name, String desc, ProtAnalysisUi ui) {
26      super(name, desc, ui);
27    }
28  
29    /*
30     * (non-Javadoc)
31     * 
32     * @see
33     * com.github.celldynamics.quimp.plugin.protanalysis.ProtAnalysisAbstractAction#actionPerformed(
34     * java.awt.event.ActionEvent)
35     */
36    @Override
37    public void actionPerformed(ActionEvent e) {
38      JToggleButton src = (JToggleButton) e.getSource();
39      if (src.isSelected()) {
40        options.bnGradientPickActive.setTrue();
41      } else {
42        options.bnGradientPickActive.setFalse();
43      }
44      logger.trace(ui.getModel().getOptions().serialize());
45  
46    }
47  }