Package org.graffiti.util
Class MaximizeManager
java.lang.Object
javax.swing.event.InternalFrameAdapter
org.graffiti.util.MaximizeManager
- All Implemented Interfaces:
ActionListener,ComponentListener,ContainerListener,EventListener,InternalFrameListener
public class MaximizeManager extends InternalFrameAdapter implements ActionListener, ComponentListener, ContainerListener
Manages a desktop containing
MaximizeFrames or
JInternalFrame with a
MaximizeLayout. If the selected internal frame is
maximized, its toolbar buttons are displayed in an associated
JMenuBar, because the original buttons are hidden by
MaximizeLayout. To use this class simply instantiate an object with the
corresponding desktop and menuBar and use MaximizeFrame instead of
JInternalFrame. Use the dispose() method to stop
displaying the buttons.- Version:
- $Revision: 1.5 $ $Date: 2010/12/22 13:05:53 $
- Author:
- Michael Forster
- See Also:
MaximizeFrame,MaximizeLayout
-
Constructor Summary
Constructors Constructor Description MaximizeManager(JDesktopPane desktop, JMenuBar menuBar)Creates a new MaximizeManager object and associates it to a desktop and a menu bar. -
Method Summary
Modifier and Type Method Description voidactionPerformed(ActionEvent event)voidcomponentAdded(ContainerEvent e)voidcomponentHidden(ComponentEvent e)voidcomponentMoved(ComponentEvent e)voidcomponentRemoved(ContainerEvent e)voidcomponentResized(ComponentEvent e)voidcomponentShown(ComponentEvent e)voiddispose()Remove the buttons from the menu bar, remove all listeners and therefore make this object eligible for garbage collection.voidinternalFrameActivated(InternalFrameEvent e)voidinternalFrameDeiconified(InternalFrameEvent e)Methods inherited from class javax.swing.event.InternalFrameAdapter
internalFrameClosed, internalFrameClosing, internalFrameDeactivated, internalFrameIconified, internalFrameOpened
-
Constructor Details
-
MaximizeManager
Creates a new MaximizeManager object and associates it to a desktop and a menu bar.- Parameters:
desktop- The associated desktopmenuBar- The associated menuBar
-
-
Method Details
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
componentAdded
- Specified by:
componentAddedin interfaceContainerListener
-
componentHidden
- Specified by:
componentHiddenin interfaceComponentListener
-
componentMoved
- Specified by:
componentMovedin interfaceComponentListener
-
componentRemoved
- Specified by:
componentRemovedin interfaceContainerListener
-
componentResized
- Specified by:
componentResizedin interfaceComponentListener
-
componentShown
- Specified by:
componentShownin interfaceComponentListener
-
dispose
public void dispose()Remove the buttons from the menu bar, remove all listeners and therefore make this object eligible for garbage collection. -
internalFrameActivated
- Specified by:
internalFrameActivatedin interfaceInternalFrameListener- Overrides:
internalFrameActivatedin classInternalFrameAdapter
-
internalFrameDeiconified
- Specified by:
internalFrameDeiconifiedin interfaceInternalFrameListener- Overrides:
internalFrameDeiconifiedin classInternalFrameAdapter
-