Class LogsPane

java.lang.Object
com.nilhcem.fakesmtp.gui.tab.LogsPane
All Implemented Interfaces:
Observer

public final class LogsPane extends Object implements Observer
Scrolled text area where will be displayed the SMTP logs.
Since:
1.0
Author:
Nilhcem
  • Constructor Details

    • LogsPane

      public LogsPane()
      Creates the text area, sets it as non-editable and sets an observer to intercept logs.
  • Method Details

    • get

      public JScrollPane get()
      Returns the JScrollPane object.
      Returns:
      the JScrollPane object.
    • update

      public void update(Observable o, Object log)
      Updates the content of the text area.

      This method will be called by an observable element.

      • If the observable is a SMTPLogsObservable object, the text area will display the received log.
      • If the observable is a ClearAllButton object, the text area will be cleared.
      Specified by:
      update in interface Observer
      Parameters:
      o - the observable element which will notify this class.
      log - optional parameter (a String object, when the observable is a SMTPLogsObservable object, which will contain the log).