org.bs.mdi.swing
Interface MDIWindowManager

All Known Implementing Classes:
TabMDIWindowManager, TraditionalMDIWindowManager

public interface MDIWindowManager

An interface for window managers. A window manager is an object which provides a desktop area and subwindows. It also knows how to create a new subwindow and how to embed in into the desktop area.


Method Summary
 void addWindow(JComponent desktop, DocumentWindow window)
          Adds the specified window to the given desktop area.
 JComponent createDesktopComponent()
          Creates the desktop area.
 DocumentWindow createDocumentWindow()
          Creates a new document subwindow.
 SwingCommand[] getSpecialCommands()
          Gets a list of special commands provided by this window manager.
 List getWindows()
          Gets a list of all document subwindows currently managed by this windowmanager.
 void windowRemoved(JComponent desktop, DocumentWindow window)
          Called from within the framework to indicate that a document subwindow has been closed.
 void windowSelected(JComponent desktop, DocumentWindow window)
          Called from within the framework to indicate that another document window has been selected.
 

Method Detail

createDesktopComponent

public JComponent createDesktopComponent()
Creates the desktop area.

Returns:
the widget which will contain the document subwindows

createDocumentWindow

public DocumentWindow createDocumentWindow()
Creates a new document subwindow. Note that the subwindow is not automatically embedded into the desktop area. This has to be done separately using the addWindow(JComponent, DocumentWindow) method.

Returns:
the document subwindow

addWindow

public void addWindow(JComponent desktop,
                      DocumentWindow window)
Adds the specified window to the given desktop area.

Parameters:
desktop - the desktop area
window - the document subwindow

windowRemoved

public void windowRemoved(JComponent desktop,
                          DocumentWindow window)
Called from within the framework to indicate that a document subwindow has been closed.

Parameters:
desktop - the desktop area
window - the document window which has just been closed

windowSelected

public void windowSelected(JComponent desktop,
                           DocumentWindow window)
Called from within the framework to indicate that another document window has been selected.

Parameters:
window - the selected window

getWindows

public List getWindows()
Gets a list of all document subwindows currently managed by this windowmanager.

Returns:
a list of document windows

getSpecialCommands

public SwingCommand[] getSpecialCommands()
Gets a list of special commands provided by this window manager. These special commands should be made accessible via the GUI by the MainWindow object.

Returns:
a list of special commands, or null if there are no special commands available.