| |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
javax.swing
类 DefaultDesktopManager
java.lang.Object javax.swing.DefaultDesktopManager
- 所有已实现的接口:
- Serializable, DesktopManager
public class DefaultDesktopManager
- extends Object
- implements DesktopManager, Serializable
此类是 DesktopManager
的实现。它当前实现了在任意父级中管理 JInternalFrame
的基本行为。不是 JDesktop
的子级的 JInternalFrame
将使用此组件来处理其类似桌面的操作。
此类为各种 JInternalFrame 方法提供策略,不应该直接调用,而应该在 DesktopManager 中调用各种 JInternalFrame 方法。
- 另请参见:
JDesktopPane
,JInternalFrame
构造方法摘要 | |
---|---|
DefaultDesktopManager() |
方法摘要 | |
---|---|
void | activateFrame(JInternalFrame f) 此方法将激活 f,将它移动到前台。 |
void | beginDraggingFrame(JComponent f) 通常在用户已经指示他们将开始拖动某个组件时调用此方法。 |
void | beginResizingFrame(JComponent f, int direction) 通常在用户已经指示他们将开始重新调整窗体的大小时调用此方法。 |
void | closeFrame(JInternalFrame f) 从父窗体中移除窗体,如有必要,还要移除 desktopIcon 。 |
void | deactivateFrame(JInternalFrame f) 通常指示此窗体失去焦点。 |
void | deiconifyFrame(JInternalFrame f) 从父窗体中移除 desktopIcon,并将其窗体添加到父窗体中。 |
void | dragFrame(JComponent f, int newX, int newY) 将正被拖动窗体的可见位置移动到指定位置。 |
void | endDraggingFrame(JComponent f) 此方法在拖动会话结束时发出信号。 |
void | endResizingFrame(JComponent f) 此方法在重新调整大小会话结束时发出信号。 |
protected Rectangle | getBoundsForIconOf(JInternalFrame f) iconifyFrame() 代码调用此方法来确定 desktopIcon 的适当边界。 |
protected Rectangle | getPreviousBounds(JInternalFrame f) 在将组件最大化之前,获得该组件的普通边界。 |
void | iconifyFrame(JInternalFrame f) 从父窗体中移除窗体,并将其 desktopIcon 添加到父窗体中。 |
void | maximizeFrame(JInternalFrame f) 重新调整窗体的大小,使其满足其父窗体的限制。 |
void | minimizeFrame(JInternalFrame f) 使窗体恢复回调用 maximizeFrame 之前的大小和位置。 |
void | openFrame(JInternalFrame f) 通常不调用此方法。 |
protected void | removeIconFor(JInternalFrame f) 在需要时移除 f 的 desktopIcon 的便捷方法。 |
void | resizeFrame(JComponent f, int newX, int newY, int newWidth, int newHeight) 使用新值调用 setBoundsForFrame 。 |
void | setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight) 此方法移动 JComponent 并重新绘制已毁坏的区域。 |
protected void | setPreviousBounds(JInternalFrame f, Rectangle r) 在进行 maximize 调用之前存储组件的边界。 |
protected void | setWasIcon(JInternalFrame f, Boolean value) 设定组件已被图标化并且 desktopIcon 的边界是有效的。 |
protected boolean | wasIcon(JInternalFrame f) 如果组件已被图标化并且 desktopIcon 的边界是有效的,则返回 true ,否则返回 false 。 |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
DefaultDesktopManager
public DefaultDesktopManager()
方法详细信息 |
---|
openFrame
public void openFrame(JInternalFrame f)
- 通常不调用此方法。如果调用此方法,它会试着确定来自窗体的 desktopIcon 的适当父窗体。如果成功添加窗体,则要从其父级中移除 desktopIcon。
- 指定者:
- 接口
DesktopManager
中的openFrame
closeFrame
public void closeFrame(JInternalFrame f)
- 从父窗体中移除窗体,如有必要,还要移除
desktopIcon
。 - 指定者:
- 接口
DesktopManager
中的closeFrame
- 参数:
f
- 要移除的JInternalFrame
maximizeFrame
public void maximizeFrame(JInternalFrame f)
- 重新调整窗体的大小,使其满足其父窗体的限制。
- 指定者:
- 接口
DesktopManager
中的maximizeFrame
- 参数:
f
- 要重新调整的窗体
minimizeFrame
public void minimizeFrame(JInternalFrame f)
- 使窗体恢复回调用
maximizeFrame
之前的大小和位置。 - 指定者:
- 接口
DesktopManager
中的minimizeFrame
- 参数:
f
- 要恢复的JInternalFrame
iconifyFrame
public void iconifyFrame(JInternalFrame f)
- 从父窗体中移除窗体,并将其
desktopIcon
添加到父窗体中。 - 指定者:
- 接口
DesktopManager
中的iconifyFrame
- 参数:
f
- 要图标化的JInternalFrame
deiconifyFrame
public void deiconifyFrame(JInternalFrame f)
- 从父窗体中移除 desktopIcon,并将其窗体添加到父窗体中。
- 指定者:
- 接口
DesktopManager
中的deiconifyFrame
- 参数:
f
- 要取消图标化的JInternalFrame
activateFrame
public void activateFrame(JInternalFrame f)
- 此方法将激活 f,将它移动到前台。此方法将当前活动窗体(如果有)的
IS_SELECTED_PROPERTY
设置为false
。在所有层中,只能有一个活动窗体。 - 指定者:
- 接口
DesktopManager
中的activateFrame
- 参数:
f
- 要激活的JInternalFrame