|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--javax.swing.DefaultDesktopManager
Unsafe: This is an implementation of the DesktopManager.
It currently implements the basic behaviors for managing
JInternalFrames in an arbitrary parent.
JInternalFrames that are not children of a
JDesktop will use this component
to handle their desktop-like actions.
This class provides a policy for the various JInternalFrame methods, it is not meant to be called directly rather the various JInternalFrame methods will call into the DesktopManager.
JDesktopPane,
JInternalFrame,
Serialized Form| Field Summary | |
private Rectangle |
currentBounds
|
private Point |
currentLoc
|
(package private) static int |
DEFAULT_DRAG_MODE
|
private Rectangle |
desktopBounds
|
private Graphics |
desktopGraphics
|
(package private) int |
dragMode
|
(package private) static int |
FASTER_DRAG_MODE
|
private Rectangle[] |
floatingItems
|
(package private) static String |
HAS_BEEN_ICONIFIED_PROPERTY
|
(package private) static int |
OUTLINE_DRAG_MODE
|
| Constructor Summary | |
DefaultDesktopManager()
Suppressed: |
|
| Method Summary | |
void |
activateFrame(JInternalFrame f)
Suppressed: This will activate f moving it to the front. |
(package private) void |
activateNextFrame(Container c)
|
void |
beginDraggingFrame(JComponent f)
Suppressed: |
void |
beginResizingFrame(JComponent f,
int direction)
Suppressed: |
void |
closeFrame(JInternalFrame f)
Suppressed: Removes the frame, and, if necessary, the desktopIcon, from its parent. |
void |
deactivateFrame(JInternalFrame f)
Suppressed: |
void |
deiconifyFrame(JInternalFrame f)
Suppressed: Removes the desktopIcon from its parent and adds its frame to the parent. |
void |
dragFrame(JComponent f,
int newX,
int newY)
Suppressed: Moves the visible location of the frame being dragged to the location specified. |
private void |
dragFrameFaster(JComponent f,
int newX,
int newY)
|
private void |
emergencyCleanup(JComponent f)
This method is here to clean up problems associated with a race condition which can occur when the full contents of a copyArea's source argument is not available onscreen. |
void |
endDraggingFrame(JComponent f)
Suppressed: |
void |
endResizingFrame(JComponent f)
Suppressed: |
private Rectangle[] |
findFloatingItems(JComponent f)
|
protected Rectangle |
getBoundsForIconOf(JInternalFrame f)
The iconifyFrame() code calls this to determine the proper bounds for the desktopIcon. |
(package private) JDesktopPane |
getDesktopPane(JComponent frame)
|
protected Rectangle |
getPreviousBounds(JInternalFrame f)
Gets the normal bounds of the component prior to the component being maximized. |
void |
iconifyFrame(JInternalFrame f)
Suppressed: Removes the frame from its parent and adds its desktopIcon to the parent. |
private boolean |
isFloaterCollision(Rectangle moveFrom,
Rectangle moveTo)
|
void |
maximizeFrame(JInternalFrame f)
Suppressed: Resizes the frame to fill its parents bounds. |
void |
minimizeFrame(JInternalFrame f)
Suppressed: Restores the frame back to its size and position prior to a maximizeFrame call. |
void |
openFrame(JInternalFrame f)
Suppressed: Normally this method will not be called. |
protected void |
removeIconFor(JInternalFrame f)
Convenience method to remove the desktopIcon of f is necessary. |
void |
resizeFrame(JComponent f,
int newX,
int newY,
int newWidth,
int newHeight)
Suppressed: Calls setBoundsForFrame with the new values. |
void |
setBoundsForFrame(JComponent f,
int newX,
int newY,
int newWidth,
int newHeight)
Suppressed: This moves the JComponent and repaints the damaged areas. |
protected void |
setPreviousBounds(JInternalFrame f,
Rectangle r)
Stores the bounds of the component just before a maximize call. |
private void |
setupDragMode(JComponent f)
|
protected void |
setWasIcon(JInternalFrame f,
Boolean value)
Sets that the component has been iconized and the bounds of the desktopIcon are valid. |
protected boolean |
wasIcon(JInternalFrame f)
Returns true if the component has been iconized
and the bounds of the desktopIcon are valid,
otherwise returns false. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static final String HAS_BEEN_ICONIFIED_PROPERTY
static final int DEFAULT_DRAG_MODE
static final int OUTLINE_DRAG_MODE
static final int FASTER_DRAG_MODE
int dragMode
private transient Rectangle currentBounds
private transient Graphics desktopGraphics
private transient Rectangle desktopBounds
private transient Rectangle[] floatingItems
private transient Point currentLoc
| Constructor Detail |
public DefaultDesktopManager()
| Method Detail |
public void openFrame(JInternalFrame f)
openFrame in interface DesktopManagerpublic void closeFrame(JInternalFrame f)
desktopIcon, from its parent.
closeFrame in interface DesktopManagerf - the JInternalFrame to be removedpublic void maximizeFrame(JInternalFrame f)
maximizeFrame in interface DesktopManagerpublic void minimizeFrame(JInternalFrame f)
maximizeFrame call.
minimizeFrame in interface DesktopManagerf - the JInternalFrame to be restoredpublic void iconifyFrame(JInternalFrame f)
desktopIcon to the parent.
iconifyFrame in interface DesktopManagerf - the JInternalFrame to be iconifiedvoid activateNextFrame(Container c)
public void deiconifyFrame(JInternalFrame f)
deiconifyFrame in interface DesktopManagerf - the JInternalFrame to be de-iconifiedpublic void activateFrame(JInternalFrame f)
IS_SELECTED_PROPERTY to false.
There can be only one active frame across all Layers.
activateFrame in interface DesktopManagerf - the JInternalFrame to be activatedpublic void deactivateFrame(JInternalFrame f)
deactivateFrame in interface DesktopManagerpublic void beginDraggingFrame(JComponent f)
beginDraggingFrame in interface DesktopManagerprivate void setupDragMode(JComponent f)
public void dragFrame(JComponent f,
int newX,
int newY)
endDraggingFrame is called.
dragFrame in interface DesktopManagerpublic void endDraggingFrame(JComponent f)
endDraggingFrame in interface DesktopManager
public void beginResizingFrame(JComponent f,
int direction)
beginResizingFrame in interface DesktopManager
public void resizeFrame(JComponent f,
int newX,
int newY,
int newWidth,
int newHeight)
setBoundsForFrame with the new values.
resizeFrame in interface DesktopManagerf - the component to be resizednewX - the new x-coordinatenewY - the new y-coordinatenewWidth - the new widthnewHeight - the new heightpublic void endResizingFrame(JComponent f)
endResizingFrame in interface DesktopManager
public void setBoundsForFrame(JComponent f,
int newX,
int newY,
int newWidth,
int newHeight)
JComponent and repaints the damaged areas.
setBoundsForFrame in interface DesktopManagerprotected void removeIconFor(JInternalFrame f)
protected Rectangle getBoundsForIconOf(JInternalFrame f)
protected void setPreviousBounds(JInternalFrame f,
Rectangle r)
f - the component about to be resizedr - the normal bounds to be saved awayprotected Rectangle getPreviousBounds(JInternalFrame f)
f - the JInternalFrame of interest
protected void setWasIcon(JInternalFrame f,
Boolean value)
desktopIcon are valid.
protected boolean wasIcon(JInternalFrame f)
true if the component has been iconized
and the bounds of the desktopIcon are valid,
otherwise returns false.
f - the JInternalFrame of interest
true if the component has been iconized;
otherwise returns falseJDesktopPane getDesktopPane(JComponent frame)
private void dragFrameFaster(JComponent f,
int newX,
int newY)
private boolean isFloaterCollision(Rectangle moveFrom,
Rectangle moveTo)
private Rectangle[] findFloatingItems(JComponent f)
private void emergencyCleanup(JComponent f)
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||