fdda.dialog.swing
Class WindowManager

java.lang.Object
  |
  +--fdda.core.projects.ProjectAdapter
        |
        +--fdda.dialog.swing.WindowManager
All Implemented Interfaces:
EventListener, ProjectListener

public class WindowManager
extends ProjectAdapter

Manages the internal frames and the window menu

Author:
Jörg Rüdenauer

Constructor Summary
protected WindowManager()
          Constructor
 
Method Summary
 void activeProjectChanged(ProjectEvent e)
          Informs the listener that another project has been activated
 void addProjectFrame(SystemFrame newFrame, String frameName, Project project)
          Adds a new project frame.
 void deleteProjectFrame(SystemFrame projectFrame, Project project)
          Removes the entry for a project frame (and all subentries).
static WindowManager getInstance()
          Returns the window manager (singleton).
 JFrame getMainFrame()
          Returns the main frame
 void projectClosed(ProjectEvent e)
          Informs the listener that a project has been closed
 void projectNameChanged(ProjectEvent e)
          Informs the listener that the name of a project has been changed
 void projectStateChanged(ProjectEvent e)
          Informs the listener that a project has changed its state
 void setMainFrame(MainFrame mainFrame)
          Sets the main frame
 void setWindowMenu(JMenu windowMenu, int windowItemCount)
          Tells the WindowManager about the window menu and its current number of entries.
 
Methods inherited from class fdda.core.projects.ProjectAdapter
projectOpened
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowManager

protected WindowManager()
Constructor

Method Detail

getInstance

public static WindowManager getInstance()
Returns the window manager (singleton).

Returns:
the window manager

addProjectFrame

public void addProjectFrame(SystemFrame newFrame,
                            String frameName,
                            Project project)
Adds a new project frame. Gives it an unique title. Adds the entry to the window menu.

Parameters:
newFrame - the new frame
frameName - suggestion for the title
project - the project of the frame

deleteProjectFrame

public void deleteProjectFrame(SystemFrame projectFrame,
                               Project project)
Removes the entry for a project frame (and all subentries).

Parameters:
projectFrame - the frame
project - the project

setWindowMenu

public void setWindowMenu(JMenu windowMenu,
                          int windowItemCount)
Tells the WindowManager about the window menu and its current number of entries.

Parameters:
windowMenu - the window menu
windowItemCount - the current number of entries (without windows)

setMainFrame

public void setMainFrame(MainFrame mainFrame)
Sets the main frame

Parameters:
mainFrame - the main frame

getMainFrame

public JFrame getMainFrame()
Returns the main frame

Returns:
the main frame

activeProjectChanged

public void activeProjectChanged(ProjectEvent e)
Description copied from interface: ProjectListener
Informs the listener that another project has been activated

Specified by:
activeProjectChanged in interface ProjectListener
Overrides:
activeProjectChanged in class ProjectAdapter
Parameters:
e - the event

projectNameChanged

public void projectNameChanged(ProjectEvent e)
Description copied from interface: ProjectListener
Informs the listener that the name of a project has been changed

Specified by:
projectNameChanged in interface ProjectListener
Overrides:
projectNameChanged in class ProjectAdapter
Parameters:
e - the event

projectStateChanged

public void projectStateChanged(ProjectEvent e)
Description copied from interface: ProjectListener
Informs the listener that a project has changed its state

Specified by:
projectStateChanged in interface ProjectListener
Overrides:
projectStateChanged in class ProjectAdapter
Parameters:
e - the event

projectClosed

public void projectClosed(ProjectEvent e)
Description copied from interface: ProjectListener
Informs the listener that a project has been closed

Specified by:
projectClosed in interface ProjectListener
Overrides:
projectClosed in class ProjectAdapter
Parameters:
e - the event


API documentation for FDDA version 0.9. Generated on 17/02/2004 14:12.