Package Controller

Class ClearListener

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

public class ClearListener
extends java.lang.Object
implements java.awt.event.ActionListener
This Class is a listener that checks if the clear button is pressed. If it is pressed the output text field is cleared of all information it contains.
  • Constructor Summary

    Constructors 
    Constructor Description
    ClearListener​(javax.swing.JTextArea outputText1)
    The constructor of the Class which takes JTextArea and builds a listener out of it.
  • Method Summary

    Modifier and Type Method Description
    void actionPerformed​(java.awt.event.ActionEvent actionEvent)
    A method which controls the action to be performed for the button pressed.

    Methods inherited from class java.lang.Object

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

    • ClearListener

      public ClearListener​(javax.swing.JTextArea outputText1)
      The constructor of the Class which takes JTextArea and builds a listener out of it.
      Parameters:
      outputText1 - the textArea to be processed.
  • Method Details

    • actionPerformed

      public void actionPerformed​(java.awt.event.ActionEvent actionEvent)
      A method which controls the action to be performed for the button pressed. In this case it clears the field.
      Specified by:
      actionPerformed in interface java.awt.event.ActionListener
      Parameters:
      actionEvent - the event monitored.