Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Class java.awt.swing.DefaultDesktopManager

java.lang.Object
    |
    +----java.awt.swing.DefaultDesktopManager

public class DefaultDesktopManager
extends Object
implements DesktopManager
This is an implementaion of the DesktopManager. It currently implements a the basic behaviors for managing JInternanFrames in an arbitrary parent. JInternalFrames that are not children of a JDesktop will use this component to handle their desktop-like actions.

See Also:
JDesktopPane, JInternalFrame

Method Summary
void  activateFrame(JInternalFrame f)
Finds all the other peers of type JInternalFrames and set's their IS_SELECTED_PROPERTY to false.
void  beginDraggingFrame(JComponent f)
 
void  beginResizingFrame(JComponent f, int direction)
 
void  closeFrame(JInternalFrame f)
Removes the frame, and if necessary the desktopIcon, from it's parent.
void  deactivateFrame(JInternalFrame f)
 
void  deiconifyFrame(JInternalFrame f)
Removes the desktopIcon from it's parent and adds it's frame to the parent.
void  dragFrame(JComponent f, int newX, int newY)
Calls setBoundsForFrame() with the new values.
void  endDraggingFrame(JComponent f)
 
void  endResizingFrame(JComponent f)
 
Rectangle  getBoundsForIconOf(JInternalFrame f)
The iconifyFrame() code calls this to determine the proper bounds for the desktopIcon.
Rectangle  getPreviousBounds(JInternalFrame f)
 
void  iconifyFrame(JInternalFrame f)
Removes the frame from it's parent and adds it's desktopIcon to the parent.
void  maximizeFrame(JInternalFrame f)
Resizes the frame to fill it's parents bounds.
void  minimizeFrame(JInternalFrame f)
Restores the frame back to it's size and position prior to a maximizeFrame() call.
void  openFrame(JInternalFrame f)
Normally this method will not be called.
void  removeIconFor(JInternalFrame f)
Convience method to remove the desktopIcon of f is necessary.
void  resizeFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
Calls setBoundsForFrame() with the new values.
void  setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
This moves the JComponent and repaints the damaged areas.
void  setPreviousBounds(JInternalFrame f, Rectangle r)
Stores the bounds of the component just before a maximize call.
void  setWasIcon(JInternalFrame f, Boolean value)
Sets that the component has been iconized and the bounds of the desktopIcon are valid.
boolean  wasIcon(JInternalFrame f)
 
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

openFrame

public void openFrame(JInternalFrame f)
Normally this method will not be called. If it is, it try to determine the appropriate parent from the desktopIcon of the frame. Will remove the desktopIcon from it's parent if it successfully adds the frame.
Implements:
openFrame in interface DesktopManager

closeFrame

public void closeFrame(JInternalFrame f)
Removes the frame, and if necessary the desktopIcon, from it's parent.
Implements:
closeFrame in interface DesktopManager

maximizeFrame

public void maximizeFrame(JInternalFrame f)
Resizes the frame to fill it's parents bounds.
Implements:
maximizeFrame in interface DesktopManager

minimizeFrame

public void minimizeFrame(JInternalFrame f)
Restores the frame back to it's size and position prior to a maximizeFrame() call.
Implements:
minimizeFrame in interface DesktopManager

iconifyFrame

public void iconifyFrame(JInternalFrame f)
Removes the frame from it's parent and adds it's desktopIcon to the parent.
Implements:
iconifyFrame in interface DesktopManager

deiconifyFrame

public void deiconifyFrame(JInternalFrame f)
Removes the desktopIcon from it's parent and adds it's frame to the parent.
Implements:
deiconifyFrame in interface DesktopManager

activateFrame

public void activateFrame(JInternalFrame f)
Finds all the other peers of type JInternalFrames and set's their IS_SELECTED_PROPERTY to false. Also moves f to the front.
Implements:
activateFrame in interface DesktopManager

deactivateFrame

public void deactivateFrame(JInternalFrame f)
Implements:
deactivateFrame in interface DesktopManager

beginDraggingFrame

public void beginDraggingFrame(JComponent f)
Implements:
beginDraggingFrame in interface DesktopManager

dragFrame

public void dragFrame(JComponent f,
                      int newX,
                      int newY)
Calls setBoundsForFrame() with the new values.
Implements:
dragFrame in interface DesktopManager

endDraggingFrame

public void endDraggingFrame(JComponent f)
Implements:
endDraggingFrame in interface DesktopManager

beginResizingFrame

public void beginResizingFrame(JComponent f,
                               int direction)
Implements:
beginResizingFrame in interface DesktopManager

resizeFrame

public void resizeFrame(JComponent f,
                        int newX,
                        int newY,
                        int newWidth,
                        int newHeight)
Calls setBoundsForFrame() with the new values.
Implements:
resizeFrame in interface DesktopManager

endResizingFrame

public void endResizingFrame(JComponent f)
Implements:
endResizingFrame in interface DesktopManager

setBoundsForFrame

public void setBoundsForFrame(JComponent f,
                              int newX,
                              int newY,
                              int newWidth,
                              int newHeight)
This moves the JComponent and repaints the damaged areas.
Implements:
setBoundsForFrame in interface DesktopManager

removeIconFor

protected void removeIconFor(JInternalFrame f)
Convience method to remove the desktopIcon of f is necessary.

getBoundsForIconOf

protected Rectangle getBoundsForIconOf(JInternalFrame f)
The iconifyFrame() code calls this to determine the proper bounds for the desktopIcon.

setPreviousBounds

protected void setPreviousBounds(JInternalFrame f,
                                 Rectangle r)
Stores the bounds of the component just before a maximize call.

getPreviousBounds

protected Rectangle getPreviousBounds(JInternalFrame f)

setWasIcon

protected void setWasIcon(JInternalFrame f,
                          Boolean value)
Sets that the component has been iconized and the bounds of the desktopIcon are valid.

wasIcon

protected boolean wasIcon(JInternalFrame f)

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.