diff --git a/AlgebraicDataflowArchitectureModel/src/application/views/NavigationWindow.java b/AlgebraicDataflowArchitectureModel/src/application/views/NavigationWindow.java index 6df73ca..c7d188b 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/views/NavigationWindow.java +++ b/AlgebraicDataflowArchitectureModel/src/application/views/NavigationWindow.java @@ -1,14 +1,12 @@ package application.views; import java.awt.Container; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import javax.swing.ButtonGroup; import javax.swing.JDialog; -import javax.swing.JPanel; import javax.swing.JToggleButton; -import javax.swing.GroupLayout.Group; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; import application.ApplicationWindow; import application.editor.Editor; @@ -35,9 +33,9 @@ dataFlowModelingButton = new JToggleButton("Data-Flow Modeling"); pushPullSelectionButton = new JToggleButton("PUSH/PULL Selection"); controlFlowDelegationButton = new JToggleButton("Control-Flow Delegation"); - dataFlowModelingButton.addChangeListener(new DataFlowModelingButtonListener()); - pushPullSelectionButton.addChangeListener(new PushPullSelectionButtonListener()); - controlFlowDelegationButton.addChangeListener(new ControlFlowDelegationButtonListener()); + dataFlowModelingButton.addActionListener(new DataFlowModelingButtonListener()); + pushPullSelectionButton.addActionListener(new PushPullSelectionButtonListener()); + controlFlowDelegationButton.addActionListener(new ControlFlowDelegationButtonListener()); ButtonGroup group = new ButtonGroup(); group.add(dataFlowModelingButton); group.add(pushPullSelectionButton); @@ -93,9 +91,9 @@ } } - private class DataFlowModelingButtonListener implements ChangeListener { + private class DataFlowModelingButtonListener implements ActionListener { @Override - public void stateChanged(ChangeEvent e) { + public void actionPerformed(ActionEvent e) { editor.changeStage(Editor.STAGE_DATA_FLOW_MODELING); if (editor.canChange(Editor.STAGE_PUSH_PULL_SELECTION)) { pushPullSelectionButton.setEnabled(true); @@ -110,9 +108,9 @@ } } - private class PushPullSelectionButtonListener implements ChangeListener { + private class PushPullSelectionButtonListener implements ActionListener { @Override - public void stateChanged(ChangeEvent e) { + public void actionPerformed(ActionEvent e) { editor.changeStage(Editor.STAGE_PUSH_PULL_SELECTION); if (editor.canChange(Editor.STAGE_DATA_FLOW_MODELING)) { dataFlowModelingButton.setEnabled(true); @@ -127,9 +125,9 @@ } } - private class ControlFlowDelegationButtonListener implements ChangeListener { + private class ControlFlowDelegationButtonListener implements ActionListener { @Override - public void stateChanged(ChangeEvent e) { + public void actionPerformed(ActionEvent e) { editor.changeStage(Editor.STAGE_CONTROL_FLOW_DELEGATION); if (editor.canChange(Editor.STAGE_DATA_FLOW_MODELING)) { dataFlowModelingButton.setEnabled(true);