public final class ClearAllButton extends Observable implements Observer
The button will ask the user if he wants to delete the received emails or not.
If yes, emails will be deleted from file system.
Constructor and Description |
---|
ClearAllButton()
Creates the "clear all" button"
|
Modifier and Type | Method and Description |
---|---|
JButton |
get()
Returns the JButton object.
|
void |
update(Observable o,
Object arg)
Enables the button, so that the user can clear/delete emails.
|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
public ClearAllButton()
The button will be disabled by default, since no email is received when the application starts.
The button will display a confirmation dialog to know if it needs to delete the received emails or not.
If yes, emails will be deleted from the file system.
public JButton get()
public void update(Observable o, Object arg)
This method will be called by a MailSaver
object when an email will be received.
Copyright © 2015. All rights reserved.