All Packages Class Hierarchy This Package Previous Next Index
Class duckMachine.GUI.runListener
java.lang.Object
|
+----duckMachine.GUI.runListener
- public class runListener
- extends Object
- implements ActionListener
The listener for run commands.
-
runListener(MachineFrame)
- The listener responds to clicks on the Run button.
-
actionPerformed(ActionEvent)
-
runListener
public runListener(MachineFrame p)
- The listener responds to clicks on the Run button. It calls the
run method in the machine with a default visitor that executes
instructions. It needs access to the parent frame to report
errors that might happen during the execution of the command.
Since the execution of the machine command might hang waiting for
input or might diverge, it runs within a newly created thread so
that the GUI can still respond to the user.
- See Also:
- run
actionPerformed
public void actionPerformed(ActionEvent evt)
All Packages Class Hierarchy This Package Previous Next Index