Class SaveMsgField

java.lang.Object
java.util.Observable
com.nilhcem.fakesmtp.gui.info.SaveMsgField
All Implemented Interfaces:
Observer

public final class SaveMsgField extends Observable implements Observer
Text field in which will be written the path where emails will be automatically saved.
Since:
1.0
Author:
Nilhcem
  • Constructor Details

    • SaveMsgField

      public SaveMsgField()
      Creates a text field and adds a mouse listener, to display the directory chooser dialog when a user clicks on the field.

      The text field will be disabled by default to avoid the user to type any folder directly.
      Instead, he can use the directory chooser dialog to select the path he wants.

  • Method Details

    • get

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

      public void update(Observable o, Object arg)
      Updates the content of the JTextField with the new directory value.

      Once a directory has been chosen by the DirChooser, the latter will notify this class, so that it can update its content.

      Specified by:
      update in interface Observer
      Parameters:
      o - the observable element which will notify this class.
      arg - optional parameters (not used).