01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: //
10:
11: package de.uka.ilkd.key.casetool.patternimplementor;
12:
13: import java.awt.GridLayout;
14: import java.awt.event.ActionEvent;
15:
16: import javax.swing.JCheckBox;
17: import javax.swing.JLabel;
18:
19: public class PIParameterGUIBoolean extends PIParameterGUI {
20:
21: public PIParameterGUIBoolean(PIParameterBoolean pip) {
22: super (pip);
23: }
24:
25: protected void buildGUI() {
26: this .setLayout(new GridLayout(1, 2));
27: this .add(new JLabel(pip.getName()));
28: content = new JCheckBox();
29: ((JCheckBox) content)
30: .setSelected(pip.getValue().equals("true"));
31: ((JCheckBox) content).addActionListener(this );
32: this .add(content);
33: updateGUI();
34: }
35:
36: public void actionPerformed(ActionEvent e) {
37: Object source = e.getSource();
38:
39: //System.out.println("actionPerformed on: " + pip.getName());
40:
41: ((PIParameterBoolean) pip).setValue(""
42: + ((JCheckBox) source).isSelected());
43: }
44: }
|