ej-technologies

org.gjt.jclasslib.mdi
Class BasicDesktopManager

java.lang.Object
  extended byjavax.swing.DefaultDesktopManager
      extended byorg.gjt.jclasslib.mdi.BasicDesktopManager
All Implemented Interfaces:
DesktopManager, EventListener, InternalFrameListener, Serializable, VetoableChangeListener
Direct Known Subclasses:
BrowserDesktopManager

public class BasicDesktopManager
extends DefaultDesktopManager
implements VetoableChangeListener, InternalFrameListener

DesktopManager for MDI application.

Version:
$Revision: 1.7 $ $Date: 2003/08/18 07:59:50 $
Author:
Ingo Kegel
See Also:
Serialized Form

Field Summary
protected  BasicMDIFrame parentFrame
          Parent frame of this DesktopManager.
 
Constructor Summary
BasicDesktopManager(BasicMDIFrame parentFrame)
          Constructor.
 
Method Summary
 void activateFrame(JInternalFrame frame)
           
 void addInternalFrame(JInternalFrame frame)
          Add a child frame to this DesktopManager.
 void checkResizeInMaximizedState()
          Check whether the desktop pane must be resized if in the maximized state.
 void checkSize()
          Check if the desktop pane should be resized.
 void cycleToNextWindow()
          Cycle to the next child window.
 void cycleToPreviousWindow()
          Cycle to the previous child window.
 void endDraggingFrame(JComponent f)
           
 void endResizingFrame(JComponent f)
           
 JDesktopPane getDesktopPane()
          Get the associated JDesktopPane.
 Rectangle getNextInternalFrameBounds()
          Get a rectangle for a new child frame.
 BasicInternalFrame getOpenFrame(Object initParam)
          Look for an open frame with an equivalent init parameter.
 List getOpenFrames()
          Get the list of open child frames.
 BasicMDIFrame getParentFrame()
          Get the parent frame.
 void internalFrameActivated(InternalFrameEvent event)
           
 void internalFrameClosed(InternalFrameEvent event)
           
 void internalFrameClosing(InternalFrameEvent event)
           
 void internalFrameDeactivated(InternalFrameEvent event)
           
 void internalFrameDeiconified(InternalFrameEvent event)
           
 void internalFrameIconified(InternalFrameEvent event)
           
 void internalFrameOpened(InternalFrameEvent event)
           
 void scrollToVisible(JInternalFrame frame)
          Scroll the destop pane such that the given frame becoes fully visible.
 void setActiveFrame(BasicInternalFrame activeFrame)
          Set the index of the frame to be shown on top after a call to showAll().
 void showAll()
          Show all internal frames.
 void stackWindows()
          Stack all child windows.
 void tileWindows()
          Tile all child windows.
 void vetoableChange(PropertyChangeEvent changeEvent)
           
 
Methods inherited from class javax.swing.DefaultDesktopManager
beginDraggingFrame, beginResizingFrame, closeFrame, deactivateFrame, deiconifyFrame, dragFrame, getBoundsForIconOf, getPreviousBounds, iconifyFrame, maximizeFrame, minimizeFrame, openFrame, removeIconFor, resizeFrame, setBoundsForFrame, setPreviousBounds, setWasIcon, wasIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentFrame

protected BasicMDIFrame parentFrame
Parent frame of this DesktopManager.

Constructor Detail

BasicDesktopManager

public BasicDesktopManager(BasicMDIFrame parentFrame)
Constructor.

Parameters:
parentFrame - the parent frame.
Method Detail

getParentFrame

public BasicMDIFrame getParentFrame()
Get the parent frame.

Returns:
the frame

getDesktopPane

public JDesktopPane getDesktopPane()
Get the associated JDesktopPane.

Returns:
the JDesktopPane

getOpenFrames

public List getOpenFrames()
Get the list of open child frames.

Returns:
the list

getNextInternalFrameBounds

public Rectangle getNextInternalFrameBounds()
Get a rectangle for a new child frame.

Returns:
the rectangle

setActiveFrame

public void setActiveFrame(BasicInternalFrame activeFrame)
Set the index of the frame to be shown on top after a call to showAll().

Parameters:
activeFrame - the index

getOpenFrame

public BasicInternalFrame getOpenFrame(Object initParam)
Look for an open frame with an equivalent init parameter.

Parameters:
initParam - the init parameter to look for.
Returns:
the open frame or null.

showAll

public void showAll()
Show all internal frames.


addInternalFrame

public void addInternalFrame(JInternalFrame frame)
Add a child frame to this DesktopManager.

Parameters:
frame - the frame

cycleToNextWindow

public void cycleToNextWindow()
Cycle to the next child window.


cycleToPreviousWindow

public void cycleToPreviousWindow()
Cycle to the previous child window.


tileWindows

public void tileWindows()
Tile all child windows.


stackWindows

public void stackWindows()
Stack all child windows.


vetoableChange

public void vetoableChange(PropertyChangeEvent changeEvent)
                    throws PropertyVetoException
Specified by:
vetoableChange in interface VetoableChangeListener
Throws:
PropertyVetoException

activateFrame

public void activateFrame(JInternalFrame frame)
Specified by:
activateFrame in interface DesktopManager

internalFrameDeiconified

public void internalFrameDeiconified(InternalFrameEvent event)
Specified by:
internalFrameDeiconified in interface InternalFrameListener

internalFrameOpened

public void internalFrameOpened(InternalFrameEvent event)
Specified by:
internalFrameOpened in interface InternalFrameListener

internalFrameIconified

public void internalFrameIconified(InternalFrameEvent event)
Specified by:
internalFrameIconified in interface InternalFrameListener

internalFrameClosing

public void internalFrameClosing(InternalFrameEvent event)
Specified by:
internalFrameClosing in interface InternalFrameListener

internalFrameActivated

public void internalFrameActivated(InternalFrameEvent event)
Specified by:
internalFrameActivated in interface InternalFrameListener

internalFrameDeactivated

public void internalFrameDeactivated(InternalFrameEvent event)
Specified by:
internalFrameDeactivated in interface InternalFrameListener

internalFrameClosed

public void internalFrameClosed(InternalFrameEvent event)
Specified by:
internalFrameClosed in interface InternalFrameListener

endResizingFrame

public void endResizingFrame(JComponent f)
Specified by:
endResizingFrame in interface DesktopManager

endDraggingFrame

public void endDraggingFrame(JComponent f)
Specified by:
endDraggingFrame in interface DesktopManager

checkSize

public void checkSize()
Check if the desktop pane should be resized.


checkResizeInMaximizedState

public void checkResizeInMaximizedState()
Check whether the desktop pane must be resized if in the maximized state.


scrollToVisible

public void scrollToVisible(JInternalFrame frame)
Scroll the destop pane such that the given frame becoes fully visible.

Parameters:
frame - the frame.

ej-technologies