org.bs.mdi.swing
Class TabMDIWindowManager

java.lang.Object
  extended byorg.bs.mdi.swing.TabMDIWindowManager
All Implemented Interfaces:
MDIWindowManager

public class TabMDIWindowManager
extends Object
implements MDIWindowManager

Alternative MDI window manager using tabs


Field Summary
protected static int numAddedWindows
           
static int windowOverlapOffset
           
 
Constructor Summary
TabMDIWindowManager()
           
 
Method Summary
 void addWindow(JComponent desktop, DocumentWindow window)
          Adds the specified window to the given desktop area.
 void closeWindow(TabDocumentWindow window)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numAddedWindows

protected static int numAddedWindows

windowOverlapOffset

public static final int windowOverlapOffset
See Also:
Constant Field Values
Constructor Detail

TabMDIWindowManager

public TabMDIWindowManager()
Method Detail

createDesktopComponent

public JComponent createDesktopComponent()
Description copied from interface: MDIWindowManager
Creates the desktop area.

Specified by:
createDesktopComponent in interface MDIWindowManager
Returns:
the widget which will contain the document subwindows

createDocumentWindow

public DocumentWindow createDocumentWindow()
Description copied from interface: MDIWindowManager
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 MDIWindowManager.addWindow(JComponent, DocumentWindow) method.

Specified by:
createDocumentWindow in interface MDIWindowManager
Returns:
the document subwindow

getWindows

public List getWindows()
Description copied from interface: MDIWindowManager
Gets a list of all document subwindows currently managed by this windowmanager.

Specified by:
getWindows in interface MDIWindowManager
Returns:
a list of document windows

addWindow

public void addWindow(JComponent desktop,
                      DocumentWindow window)
Description copied from interface: MDIWindowManager
Adds the specified window to the given desktop area.

Specified by:
addWindow in interface MDIWindowManager
Parameters:
desktop - the desktop area
window - the document subwindow

windowRemoved

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

Specified by:
windowRemoved in interface MDIWindowManager
Parameters:
desktop - the desktop area
window - the document window which has just been closed

windowSelected

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

Specified by:
windowSelected in interface MDIWindowManager
Parameters:
window - the selected window

getSpecialCommands

public SwingCommand[] getSpecialCommands()
Description copied from interface: MDIWindowManager
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.

Specified by:
getSpecialCommands in interface MDIWindowManager
Returns:
a list of special commands, or null if there are no special commands available.

closeWindow

public void closeWindow(TabDocumentWindow window)