Package org.graffiti.util
Class DesktopMenuManager
java.lang.Object
org.graffiti.util.MenuAdapter
org.graffiti.util.DesktopMenuManager
- All Implemented Interfaces:
EventListener
,MenuListener
,SessionListener
public class DesktopMenuManager extends MenuAdapter implements SessionListener
Manages menu entries for the internal frames contained in a desktop pane. A
MenuManager is associated with a
JDesktopPane
and a
JMenu
. The associated menu is always updated to contain
entries for all internal frames in the desktop pane. Selecting such a frame
entry selects the corresponding internal frame. In addition, actions for
arranging the frames are added to the menu.- Version:
- $Revision: 1.9 $ $Date: 2011/06/30 06:55:30 $
- Author:
- Michael Forster
- Recent revisions:
- 2.7.0
-
Constructor Summary
Constructors Constructor Description DesktopMenuManager(JDesktopPane desktop, JMenu menu)
Create a MenuManager object and associate it with a desktop and a menu. -
Method Summary
Modifier and Type Method Description void
cascade()
Arrange all internal frames in cascading order.void
dispose()
Dispose this manager.void
menuSelected(MenuEvent e)
Updates the associated menu.void
sessionChanged(Session s)
This method is called when the session changes.void
sessionDataChanged(Session s)
This method is called when the data (except the graph data) are changed.Methods inherited from class org.graffiti.util.MenuAdapter
menuCanceled, menuDeselected
-
Constructor Details
-
DesktopMenuManager
Create a MenuManager object and associate it with a desktop and a menu.- Parameters:
desktop
- The associated desktopmenu
- The associated menu- Throws:
NullPointerException
- if a passed parameter is null
-
-
Method Details
-
dispose
public void dispose()Dispose this manager. Reset the menu, remove all listeners and make this class eligible for garbage collection. -
cascade
public void cascade()Arrange all internal frames in cascading order. -
sessionChanged
Description copied from interface:SessionListener
This method is called when the session changes.- Specified by:
sessionChanged
in interfaceSessionListener
- Parameters:
s
- the new Session.
-
sessionDataChanged
Description copied from interface:SessionListener
This method is called when the data (except the graph data) are changed.- Specified by:
sessionDataChanged
in interfaceSessionListener
-