|
My Movies 1.0.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectMainWindow
public final class MainWindow
Main window for the application.
A menu bar, and a sortable table containing the user's list of movies.
Some applications would add a confirmation dialog when the user exits.
| Method Summary | |
|---|---|
void |
buildAndShow(String aUserName)
Build and display the main window. |
static MainWindow |
getInstance()
Return an instance of this class. |
String |
getUserName()
Return the user name passed to buildAndShow(String). |
void |
refreshView()
Refresh the display in response to changing database content. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MainWindow getInstance()
This class is made a singleton, since there is only one main window. Any caller can refresh the main window using
MainWindow.getInstance().refreshView();This lets the app avoid needing to pass around an object reference to the main window.
public void buildAndShow(String aUserName)
aUserName - user name, as validated by
LoginController.public void refreshView()
public String getUserName()
buildAndShow(String).
The user name can be accessed anywhere using :
MainWindow.getInstance().getUserName();
|
My Movies 1.0.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||