Package com.nilhcem.fakesmtp.gui.info
Class SaveMsgField
java.lang.Object
java.util.Observable
com.nilhcem.fakesmtp.gui.info.SaveMsgField
- All Implemented Interfaces:
Observer
Text field in which will be written the path where emails will be automatically saved.
- Since:
- 1.0
- Author:
- Nilhcem
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a text field and adds a mouse listener, to display the directory chooser dialog when a user clicks on the field. -
Method Summary
Modifier and TypeMethodDescriptionget()
Returns the JTextField object.void
update
(Observable o, Object arg) Updates the content of the JTextField with the new directory value.Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
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
Returns the JTextField object.- Returns:
- the JTextField object.
-
update
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.
-