Package Controller

Class ButtonListener

java.lang.Object
Controller.ButtonListener
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class ButtonListener
extends java.lang.Object
implements java.awt.event.ActionListener
This Class contains a listener which reacts when the Run Tests button is pressed. It is the only Class that knows of the Model and thereby is the Class that starts the logic process when the button is pressed.
  • Constructor Summary

    Constructors 
    Constructor Description
    ButtonListener​(javax.swing.JTextField inputText1, javax.swing.JTextArea outputText1)
    The constructor of the class which specifies which textField is to be used in the Controller.
  • Method Summary

    Modifier and Type Method Description
    void actionPerformed​(java.awt.event.ActionEvent actionEvent)
    The method that performs if the button is pressed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ButtonListener

      public ButtonListener​(javax.swing.JTextField inputText1, javax.swing.JTextArea outputText1)
      The constructor of the class which specifies which textField is to be used in the Controller.
      Parameters:
      inputText1 - the JTextField you want to input to.
      outputText1 - the JTextArea to output text to.
  • Method Details

    • actionPerformed

      public void actionPerformed​(java.awt.event.ActionEvent actionEvent)
      The method that performs if the button is pressed. It runs any TestClass which is located in the Test package of this program.
      Specified by:
      actionPerformed in interface java.awt.event.ActionListener
      Parameters:
      actionEvent - the event to be monitored.