| 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 javax.swing.event.*; | |
| 10 | import java.awt.*; | |
| 11 | import java.awt.event.*; | |
| 12 | ||
| 13 | ||
| 14 | public class GUISettingsDialog extends JDialog { | |
| 15 | ||
| 16 | protected JButton applyButton, closeButton; | |
| 17 | ||
| 18 | protected GUISettingsDialog(Frame ownerFrame, boolean modal) { | |
| 19 | super(ownerFrame, modal); | |
| 20 | } | |
| 21 | ||
| 22 | ||
| 23 | 3 | protected ChangeListener stateChangeListener = new ChangeListener() { |
| 24 | public void stateChanged(ChangeEvent e) { | |
| 25 | 3 | applyButton.setEnabled(true); |
| 26 | 2 | checkCorrespondance((javax.swing.JCheckBox) e.getSource()); |
| 27 | } | |
| 28 | }; | |
| 29 | ||
| 30 | ||
| 31 | 3 | protected ComponentListener settingsDialogListener = new ComponentListener() { |
| 32 | public void componentShown(ComponentEvent e) { | |
| 33 | 3 | applyButton.setEnabled(false); |
| 34 | } | |
| 35 | ||
| 36 | public void componentHidden(ComponentEvent e) { | |
| 37 | } | |
| 38 | ||
| 39 | public void componentMoved(ComponentEvent e) { | |
| 40 | } | |
| 41 | ||
| 42 | public void componentResized(ComponentEvent e) { | |
| 43 | } | |
| 44 | }; | |
| 45 | ||
| 46 | ||
| 47 | 3 | protected ActionListener applyButtonActionListener = new ActionListener() { |
| 48 | public void actionPerformed(ActionEvent e) { | |
| 49 | 3 | applyButton.setEnabled(false); |
| 50 | } | |
| 51 | }; | |
| 52 | ||
| 53 | ||
| 54 | 3 | protected ActionListener closeButtonActionListener = new ActionListener() { |
| 55 | public void actionPerformed(ActionEvent e) { | |
| 56 | 3 | setVisible(false); |
| 57 | } | |
| 58 | }; | |
| 59 | ||
| 60 | protected void checkCorrespondance(javax.swing.JCheckBox changee) { | |
| 61 | } | |
| 62 | ||
| 63 | } | |
| 64 | | |
Mutations | ||
| 23 |
removed call to fi/helsinki/cs/titokone/GUISettingsDialog$1::<init> : NO_COVERAGE Removed assignment to member variable stateChangeListener : NO_COVERAGE Removed assignment to member variable this$0 : NO_COVERAGE |
|
| 25 |
Substituted 1 with 0 : NO_COVERAGE Substituted 1 with 0 : NO_COVERAGE removed call to javax/swing/JButton::setEnabled : NO_COVERAGE |
|
| 26 |
removed call to javax/swing/event/ChangeEvent::getSource : NO_COVERAGE removed call to fi/helsinki/cs/titokone/GUISettingsDialog::checkCorrespondance : NO_COVERAGE |
|
| 31 |
removed call to fi/helsinki/cs/titokone/GUISettingsDialog$2::<init> : NO_COVERAGE Removed assignment to member variable settingsDialogListener : NO_COVERAGE Removed assignment to member variable this$0 : NO_COVERAGE |
|
| 33 |
Substituted 0 with 1 : NO_COVERAGE removed call to javax/swing/JButton::setEnabled : NO_COVERAGE Substituted 0 with 1 : NO_COVERAGE |
|
| 47 |
Removed assignment to member variable applyButtonActionListener : NO_COVERAGE removed call to fi/helsinki/cs/titokone/GUISettingsDialog$3::<init> : NO_COVERAGE Removed assignment to member variable this$0 : NO_COVERAGE |
|
| 49 |
Substituted 0 with 1 : NO_COVERAGE Substituted 0 with 1 : NO_COVERAGE removed call to javax/swing/JButton::setEnabled : NO_COVERAGE |
|
| 54 |
Removed assignment to member variable this$0 : NO_COVERAGE removed call to fi/helsinki/cs/titokone/GUISettingsDialog$4::<init> : NO_COVERAGE Removed assignment to member variable closeButtonActionListener : NO_COVERAGE |
|
| 56 |
Substituted 0 with 1 : NO_COVERAGE Substituted 0 with 1 : NO_COVERAGE removed call to fi/helsinki/cs/titokone/GUISettingsDialog::setVisible : NO_COVERAGE |