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
MaximizeFrame
s 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 void
actionPerformed(ActionEvent event)
void
componentAdded(ContainerEvent e)
void
componentHidden(ComponentEvent e)
void
componentMoved(ComponentEvent e)
void
componentRemoved(ContainerEvent e)
void
componentResized(ComponentEvent e)
void
componentShown(ComponentEvent e)
void
dispose()
Remove the buttons from the menu bar, remove all listeners and therefore make this object eligible for garbage collection.void
internalFrameActivated(InternalFrameEvent e)
void
internalFrameDeiconified(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:
actionPerformed
in interfaceActionListener
-
componentAdded
- Specified by:
componentAdded
in interfaceContainerListener
-
componentHidden
- Specified by:
componentHidden
in interfaceComponentListener
-
componentMoved
- Specified by:
componentMoved
in interfaceComponentListener
-
componentRemoved
- Specified by:
componentRemoved
in interfaceContainerListener
-
componentResized
- Specified by:
componentResized
in interfaceComponentListener
-
componentShown
- Specified by:
componentShown
in 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:
internalFrameActivated
in interfaceInternalFrameListener
- Overrides:
internalFrameActivated
in classInternalFrameAdapter
-
internalFrameDeiconified
- Specified by:
internalFrameDeiconified
in interfaceInternalFrameListener
- Overrides:
internalFrameDeiconified
in classInternalFrameAdapter
-