GUICompileSettingsDialog.java

1
// Copyright © 2004-2006 University of Helsinki, Department of Computer Science
2
// Copyright © 2012 various contributors
3
// This software is released under GNU Lesser General Public License 2.1.
4
// The license text is at http://www.gnu.org/licenses/lgpl-2.1.html
5
6
package fi.helsinki.cs.titokone;
7
8
import javax.swing.*;
9
import java.awt.*;
10
11
12
public class GUICompileSettingsDialog extends GUISettingsDialog {
13
14
    public JCheckBox lineByLineCheckBox;
15
    public JCheckBox showCommentsCheckBox;
16
17
    public static String APPLY = "GUICompileSettingsDialog_Apply";
18
19
20
    public GUICompileSettingsDialog(Frame ownerFrame, boolean modal) {
21
22
        super(ownerFrame, modal);
23 1
        setTitle("Set compiling options");
24
        //setSize(250,180);
25
26 2
        applyButton = new JButton("Apply");
27 2
        closeButton = new JButton("Close");
28
29 1
        applyButton.setActionCommand(APPLY);
30 1
        applyButton.addActionListener((GUI) ownerFrame);
31 1
        applyButton.addActionListener(applyButtonActionListener);
32
33 1
        closeButton.addActionListener(closeButtonActionListener);
34
35 1
        this.addComponentListener(settingsDialogListener);
36
37 2
        lineByLineCheckBox = new JCheckBox("Compile line by line");
38 1
        lineByLineCheckBox.addChangeListener(stateChangeListener);
39 2
        showCommentsCheckBox = new JCheckBox("Show comments");
40 1
        showCommentsCheckBox.addChangeListener(stateChangeListener);
41
42 3
        getContentPane().setLayout(new BorderLayout());
43
44 6
        JPanel checkBoxPanel = new JPanel(new GridLayout(2, 1));
45
46 1
        checkBoxPanel.add(lineByLineCheckBox);
47 1
        checkBoxPanel.add(showCommentsCheckBox);
48
49 2
        JPanel buttonPanel = new JPanel(new FlowLayout());
50 1
        buttonPanel.add(applyButton);
51 1
        buttonPanel.add(closeButton);
52
53 2
        getContentPane().add(checkBoxPanel, BorderLayout.CENTER);
54 2
        getContentPane().add(buttonPanel, BorderLayout.SOUTH);
55
56 1
        pack();
57
58 3
        setDefaultCloseOperation(DISPOSE_ON_CLOSE);
59
60
    }
61
62
63
    public void updateAllTexts() {
64 3
        setTitle(new Message("Set compiling options").toString());
65 3
        lineByLineCheckBox.setText(new Message("Pause whenever a comment occurs").toString());
66 3
        showCommentsCheckBox.setText(new Message("Show extra comments while compiling").toString());
67 3
        applyButton.setText(new Message("Apply").toString());
68 3
        closeButton.setText(new Message("Close").toString());
69 1
        pack();
70
    }
71
72
73
}
74

Mutations

23

removed call to fi/helsinki/cs/titokone/GUICompileSettingsDialog::setTitle : NO_COVERAGE

26

Removed assignment to member variable applyButton : NO_COVERAGE

removed call to javax/swing/JButton::<init> : NO_COVERAGE

27

removed call to javax/swing/JButton::<init> : NO_COVERAGE

Removed assignment to member variable closeButton : NO_COVERAGE

29

removed call to javax/swing/JButton::setActionCommand : NO_COVERAGE

30

removed call to javax/swing/JButton::addActionListener : NO_COVERAGE

31

removed call to javax/swing/JButton::addActionListener : NO_COVERAGE

33

removed call to javax/swing/JButton::addActionListener : NO_COVERAGE

35

removed call to fi/helsinki/cs/titokone/GUICompileSettingsDialog::addComponentListener : NO_COVERAGE

37

removed call to javax/swing/JCheckBox::<init> : NO_COVERAGE

Removed assignment to member variable lineByLineCheckBox : NO_COVERAGE

38

removed call to javax/swing/JCheckBox::addChangeListener : NO_COVERAGE

39

Removed assignment to member variable showCommentsCheckBox : NO_COVERAGE

removed call to javax/swing/JCheckBox::<init> : NO_COVERAGE

40

removed call to javax/swing/JCheckBox::addChangeListener : NO_COVERAGE

42

removed call to java/awt/Container::setLayout : NO_COVERAGE

removed call to fi/helsinki/cs/titokone/GUICompileSettingsDialog::getContentPane : NO_COVERAGE

removed call to java/awt/BorderLayout::<init> : NO_COVERAGE

44

Substituted 1 with 0 : NO_COVERAGE

Substituted 2 with 3 : NO_COVERAGE

Substituted 2 with 3 : NO_COVERAGE

Substituted 1 with 0 : NO_COVERAGE

removed call to java/awt/GridLayout::<init> : NO_COVERAGE

removed call to javax/swing/JPanel::<init> : NO_COVERAGE

46

removed call to javax/swing/JPanel::add : NO_COVERAGE

47

removed call to javax/swing/JPanel::add : NO_COVERAGE

49

removed call to java/awt/FlowLayout::<init> : NO_COVERAGE

removed call to javax/swing/JPanel::<init> : NO_COVERAGE

50

removed call to javax/swing/JPanel::add : NO_COVERAGE

51

removed call to javax/swing/JPanel::add : NO_COVERAGE

53

removed call to java/awt/Container::add : NO_COVERAGE

removed call to fi/helsinki/cs/titokone/GUICompileSettingsDialog::getContentPane : NO_COVERAGE

54

removed call to java/awt/Container::add : NO_COVERAGE

removed call to fi/helsinki/cs/titokone/GUICompileSettingsDialog::getContentPane : NO_COVERAGE

56

removed call to fi/helsinki/cs/titokone/GUICompileSettingsDialog::pack : NO_COVERAGE

58

Substituted 2 with 3 : NO_COVERAGE

Substituted 2 with 3 : NO_COVERAGE

removed call to fi/helsinki/cs/titokone/GUICompileSettingsDialog::setDefaultCloseOperation : NO_COVERAGE

64

removed call to fi/helsinki/cs/titokone/GUICompileSettingsDialog::setTitle : NO_COVERAGE

removed call to fi/helsinki/cs/titokone/Message::toString : NO_COVERAGE

removed call to fi/helsinki/cs/titokone/Message::<init> : NO_COVERAGE

65

removed call to fi/helsinki/cs/titokone/Message::toString : NO_COVERAGE

removed call to fi/helsinki/cs/titokone/Message::<init> : NO_COVERAGE

removed call to javax/swing/JCheckBox::setText : NO_COVERAGE

66

removed call to fi/helsinki/cs/titokone/Message::<init> : NO_COVERAGE

removed call to javax/swing/JCheckBox::setText : NO_COVERAGE

removed call to fi/helsinki/cs/titokone/Message::toString : NO_COVERAGE

67

removed call to fi/helsinki/cs/titokone/Message::toString : NO_COVERAGE

removed call to fi/helsinki/cs/titokone/Message::<init> : NO_COVERAGE

removed call to javax/swing/JButton::setText : NO_COVERAGE

68

removed call to javax/swing/JButton::setText : NO_COVERAGE

removed call to fi/helsinki/cs/titokone/Message::toString : NO_COVERAGE

removed call to fi/helsinki/cs/titokone/Message::<init> : NO_COVERAGE

69

removed call to fi/helsinki/cs/titokone/GUICompileSettingsDialog::pack : NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 0.27