org.graffiti.util
Class MaximizeManager

java.lang.Object
  extended by javax.swing.event.InternalFrameAdapter
      extended by 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: 5779 $ $Date: 2009-10-23 13:07:21 +0200 (Fr, 23 Okt 2009) $
Author:
Michael Forster
See Also:
MaximizeFrame, MaximizeLayout

Constructor Summary
MaximizeManager(JDesktopPane desktop, JMenuBar menuBar)
          Creates a new MaximizeManager object and associates it to a desktop and a menu bar.
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaximizeManager

public MaximizeManager(JDesktopPane desktop,
                       JMenuBar menuBar)
Creates a new MaximizeManager object and associates it to a desktop and a menu bar.

Parameters:
desktop - The associated desktop
menuBar - The associated menuBar
Method Detail

actionPerformed

public void actionPerformed(ActionEvent event)
Specified by:
actionPerformed in interface ActionListener

componentAdded

public void componentAdded(ContainerEvent e)
Specified by:
componentAdded in interface ContainerListener

componentHidden

public void componentHidden(ComponentEvent e)
Specified by:
componentHidden in interface ComponentListener

componentMoved

public void componentMoved(ComponentEvent e)
Specified by:
componentMoved in interface ComponentListener

componentRemoved

public void componentRemoved(ContainerEvent e)
Specified by:
componentRemoved in interface ContainerListener

componentResized

public void componentResized(ComponentEvent e)
Specified by:
componentResized in interface ComponentListener

componentShown

public void componentShown(ComponentEvent e)
Specified by:
componentShown in interface ComponentListener

dispose

public void dispose()
Remove the buttons from the menu bar, remove all listeners and therefore make this object eligible for garbage collection.


internalFrameActivated

public void internalFrameActivated(InternalFrameEvent e)
Specified by:
internalFrameActivated in interface InternalFrameListener
Overrides:
internalFrameActivated in class InternalFrameAdapter

internalFrameDeiconified

public void internalFrameDeiconified(InternalFrameEvent e)
Specified by:
internalFrameDeiconified in interface InternalFrameListener
Overrides:
internalFrameDeiconified in class InternalFrameAdapter


Generated at 2012-05-30 11:00:36 PM CEST