| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class DefaultDesktopManager extends Object implements DesktopManager, Serializable
This is an implementation of the DesktopManager
.
It currently implements the basic behaviors for managing
JInternalFrame
s in an arbitrary parent.
JInternalFrame
s 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.
Constructor Summary | |
---|---|
|
Method Summary | |
---|---|
void |
This will activate f moving it to the front. |
void |
|
void |
beginResizingFrame(JComponent f, int direction) |
void |
Removes the frame, and, if necessary, the desktopIcon , from its parent.
|
void |
|
void |
Removes the desktopIcon from its parent and adds its frame to the parent. |
void |
dragFrame(JComponent f, int newX, int newY) Moves the visible location of the frame being dragged to the location specified. |
void |
|
void |
|
protected Rectangle |
The iconifyFrame() code calls this to determine the proper bounds for the desktopIcon. |
protected Rectangle |
Gets the normal bounds of the component prior to the component being maximized. |
void |
Removes the frame from its parent and adds its desktopIcon to the parent.
|
void |
Resizes the frame to fill its parents bounds. |
void |
Restores the frame back to its size and position prior to a maximizeFrame call.
|
void |
Normally this method will not be called. |
protected void |
Convenience 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.
|
protected void |
Stores the bounds of the component just before a maximize call. |
protected void |
setWasIcon(JInternalFrame f, Boolean value) Sets that the component has been iconized and the bounds of the desktopIcon are valid.
|
protected boolean |
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 |
Constructor Detail |
---|
public DefaultDesktopManager()
Method Detail |
---|
public void activateFrame(JInternalFrame f)
IS_SELECTED_PROPERTY
to false
.
There can be only one active frame across all Layers.
f
- the JInternalFrame
to be activatedpublic void beginDraggingFrame(JComponent f)
f
public void beginResizingFrame(JComponent f, int direction)
f
direction
public void closeFrame(JInternalFrame f)
desktopIcon
, from its parent.
f
- the JInternalFrame
to be removedpublic void deactivateFrame(JInternalFrame f)
f
public void deiconifyFrame(JInternalFrame f)
f
- the JInternalFrame
to be de-iconifiedpublic void dragFrame(JComponent f, int newX, int newY)
endDraggingFrame
is called.
f
newX
newY
public void endDraggingFrame(JComponent f)
f
public void endResizingFrame(JComponent f)
f
protected Rectangle getBoundsForIconOf(JInternalFrame f)
f
protected Rectangle getPreviousBounds(JInternalFrame f)
f
- the JInternalFrame
of interestpublic void iconifyFrame(JInternalFrame f)
desktopIcon
to the parent.
f
- the JInternalFrame
to be iconifiedpublic void maximizeFrame(JInternalFrame f)
f
- the frame to be resizedpublic void minimizeFrame(JInternalFrame f)
maximizeFrame
call.
f
- the JInternalFrame
to be restoredpublic void openFrame(JInternalFrame f)
f
protected void removeIconFor(JInternalFrame f)
f
public void resizeFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
setBoundsForFrame
with the new values.
f
- the component to be resizednewX
- the new x-coordinatenewY
- the new y-coordinatenewWidth
- the new widthnewHeight
- the new heightpublic void setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
JComponent
and repaints the damaged areas.
f
newX
newY
newWidth
newHeight
protected void setPreviousBounds(JInternalFrame f, Rectangle r)
f
- the component about to be resizedr
- the normal bounds to be saved awayprotected void setWasIcon(JInternalFrame f, Boolean value)
desktopIcon
are valid.
f
value
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 interesttrue
if the component has been iconized;
otherwise returns false
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |