My Movies 1.0.0

hirondelle.movies.main
Class MainWindow

Object
  extended by MainWindow

public final class MainWindow
extends Object

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

getInstance

public static MainWindow getInstance()
Return an instance of this class.

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.


buildAndShow

public void buildAndShow(String aUserName)
Build and display the main window.

Parameters:
aUserName - user name, as validated by LoginController.

refreshView

public void refreshView()
Refresh the display in response to changing database content.


getUserName

public String getUserName()
Return the user name passed to buildAndShow(String).

The user name can be accessed anywhere using :

MainWindow.getInstance().getUserName();


My Movies 1.0.0

Copyright Hirondelle Systems - Generated 2008Dec30.15.53