com.glaivestone.mv
Class MasterWindowSessionControlPolicy

java.lang.Object
  |
  +--com.glaivestone.mv.WindowEventAdaptor
        |
        +--com.glaivestone.mv.BasicSessionControlPolicy
              |
              +--com.glaivestone.mv.MasterWindowSessionControlPolicy
All Implemented Interfaces:
java.util.EventListener, SessionControlPolicy, WindowEventListener

public class MasterWindowSessionControlPolicy
extends BasicSessionControlPolicy

A session control policy for an application session which is controlled by a single master window and terminated when the controlling master window is closed. The master window may open any number of secondary (slave) main windows within the session.

The master window should usually be the main window that is opened when the application is initiated. The master window (sometimes referred to as a "launcher" window) typically provides the focal point for the user to access application services and tools.

The master window is responsible for providing an orderly shutdown of the session when it closes. As usual, this involves ensuring that the status of any unsaved changes in the application state are resolved by the user, either by saving or discarding the changes. In addition to handling its own state, as is customary for any main window, the master window is also responsible for ensuring that any open secondary windows in the session are handled suitably and closed.

Author:
Deb Lewis

Field Summary
 
Fields inherited from class com.glaivestone.mv.BasicSessionControlPolicy
NOP_SESSION_CONTROL_POLICY
 
Constructor Summary
MasterWindowSessionControlPolicy(java.awt.Window aWindow)
          Create a new master-window session control policy with the specified view as the master window controlling the session.
 
Method Summary
 java.awt.Window getMasterWindow()
          Answer the master window controlling the session.
 boolean isMasterWindow(java.awt.Window aWindow)
          Answer whether the specified window is the master window controlling the session.
 void windowClosed(WindowEvent event)
          Notification event that a window has been closed.
 
Methods inherited from class com.glaivestone.mv.WindowEventAdaptor
confirmWindowClose, windowClosing, windowOpened
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.glaivestone.mv.WindowEventListener
confirmWindowClose, windowClosing, windowOpened
 

Constructor Detail

MasterWindowSessionControlPolicy

public MasterWindowSessionControlPolicy(java.awt.Window aWindow)
Create a new master-window session control policy with the specified view as the master window controlling the session.

Method Detail

getMasterWindow

public java.awt.Window getMasterWindow()
Answer the master window controlling the session.


isMasterWindow

public boolean isMasterWindow(java.awt.Window aWindow)
Answer whether the specified window is the master window controlling the session.


windowClosed

public void windowClosed(WindowEvent event)
Notification event that a window has been closed.

Specified by:
windowClosed in interface WindowEventListener
Overrides:
windowClosed in class WindowEventAdaptor
See Also:
WindowEventListener.windowClosed(com.glaivestone.mv.WindowEvent)

GFL 1.1 API