Package com.nilhcem.fakesmtp.gui.tab
Class MailsListPane
java.lang.Object
com.nilhcem.fakesmtp.gui.tab.MailsListPane
- All Implemented Interfaces:
Observer
Scrolled table where will be displayed every received email (one line for each email).
The user can double-click on any row to see the selected email.
- Since:
- 1.0
- Author:
- Nilhcem
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()
Returns the JScrollPane object.void
update
(Observable o, Object arg) Updates the content of the table.
-
Constructor Details
-
MailsListPane
public MailsListPane()Creates the table and sets its cells as non editable.Adds some mouse events on the table, to display emails, when a user clicks on a specific row.
If the email can't be found, an error message will be displayed.
The table will reset the size of its column every time the size of the table changed (for example when the user maximizes the window).
-
-
Method Details
-
get
Returns the JScrollPane object.- Returns:
- the JScrollPane object.
-
update
Updates the content of the table.This method will be called by an observable element.
- If the observable is a
MailSaver
object, a new row will be added to the table, and theUIModel
will be updated; - If the observable is a
ClearAllButton
object, all the cells of the table will be removed, and theUIModel
will be updated.
- If the observable is a
-