java.lang.Object | |
↳ | javax.swing.DefaultDesktopManager |
![]() |
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.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This will activate f moving it to the front.
| |||||||||||
This method is normally called when the user has indicated that
they will begin dragging a component around.
| |||||||||||
This methods is normally called when the user has indicated that
they will begin resizing the frame.
| |||||||||||
Removes the frame, and, if necessary, the
desktopIcon , from its parent. | |||||||||||
Generally, indicate that this frame has lost focus.
| |||||||||||
Removes the desktopIcon from its parent and adds its frame
to the parent.
| |||||||||||
Moves the visible location of the frame being dragged
to the location specified.
| |||||||||||
This method signals the end of the dragging session.
| |||||||||||
This method signals the end of the resize session.
| |||||||||||
Removes the frame from its parent and adds its
desktopIcon to the parent. | |||||||||||
Resizes the frame to fill its parents bounds.
| |||||||||||
Restores the frame back to its size and position prior
to a
maximizeFrame call. | |||||||||||
Normally this method will not be called.
| |||||||||||
Calls
setBoundsForFrame with the new values. | |||||||||||
This moves the
JComponent and repaints the damaged areas. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
The iconifyFrame() code calls this to determine the proper bounds
for the desktopIcon.
| |||||||||||
Gets the normal bounds of the component prior to the component
being maximized.
| |||||||||||
Convenience method to remove the desktopIcon of f is necessary.
| |||||||||||
Stores the bounds of the component just before a maximize call.
| |||||||||||
Sets that the component has been iconized and the bounds of the
desktopIcon are valid. | |||||||||||
Returns
true if the component has been iconized
and the bounds of the desktopIcon are valid,
otherwise returns false . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
This will activate f moving it to the front. It will
set the current active frame's (if any)
IS_SELECTED_PROPERTY
to false
.
There can be only one active frame across all Layers.
f | the JInternalFrame to be activated
|
---|
This method is normally called when the user has indicated that they will begin dragging a component around. This method should be called prior to any dragFrame() calls to allow the DesktopManager to prepare any necessary state. Normally f will be a JInternalFrame.
This methods is normally called when the user has indicated that they will begin resizing the frame. This method should be called prior to any resizeFrame() calls to allow the DesktopManager to prepare any necessary state. Normally f will be a JInternalFrame.
Removes the frame, and, if necessary, the
desktopIcon
, from its parent.
f | the JInternalFrame to be removed
|
---|
Generally, indicate that this frame has lost focus. This is usually called after the JInternalFrame's IS_SELECTED_PROPERTY has been set to false.
Removes the desktopIcon from its parent and adds its frame to the parent.
f | the JInternalFrame to be de-iconified
|
---|
Moves the visible location of the frame being dragged
to the location specified. The means by which this occurs can vary depending
on the dragging algorithm being used. The actual logical location of the frame
might not change until endDraggingFrame
is called.
This method signals the end of the dragging session. Any state maintained by the DesktopManager can be removed here. Normally f will be a JInternalFrame.
This method signals the end of the resize session. Any state maintained by the DesktopManager can be removed here. Normally f will be a JInternalFrame.
Removes the frame from its parent and adds its
desktopIcon
to the parent.
f | the JInternalFrame to be iconified
|
---|
Resizes the frame to fill its parents bounds.
f | the frame to be resized |
---|
Restores the frame back to its size and position prior
to a maximizeFrame
call.
f | the JInternalFrame to be restored
|
---|
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 its parent if it successfully adds the frame.
Calls setBoundsForFrame
with the new values.
f | the component to be resized |
---|---|
newX | the new x-coordinate |
newY | the new y-coordinate |
newWidth | the new width |
newHeight | the new height |
This moves the JComponent
and repaints the damaged areas.
The iconifyFrame() code calls this to determine the proper bounds for the desktopIcon.
Gets the normal bounds of the component prior to the component being maximized.
f | the JInternalFrame of interest |
---|
Convenience method to remove the desktopIcon of f is necessary.
Stores the bounds of the component just before a maximize call.
f | the component about to be resized |
---|---|
r | the normal bounds to be saved away |
Sets that the component has been iconized and the bounds of the
desktopIcon
are valid.
Returns 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 false