- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.InternalFrameUI
-
- javax.swing.plaf.basic.BasicInternalFrameUI
-
- 已知直接子类:
-
MetalInternalFrameUI,SynthInternalFrameUI
public class BasicInternalFrameUI extends InternalFrameUI
JInternalFrame的基本L&F实现。
-
-
Nested Class Summary
Nested Classes Modifier and Type Class 描述 protected classBasicInternalFrameUI.BasicInternalFrameListener基本内部框架监听器。protected classBasicInternalFrameUI.BorderListener倾听边界调整。protected classBasicInternalFrameUI.ComponentHandler组件处理程序protected classBasicInternalFrameUI.GlassPaneDispatcher玻璃窗格调度器。classBasicInternalFrameUI.InternalFrameLayout内部框架布局。classBasicInternalFrameUI.InternalFramePropertyChangeListener内部框架属性更改侦听器。
-
Field Summary
Fields Modifier and Type Field 描述 protected MouseInputAdapterborderListener边界听众protected ComponentListenercomponentListener组件侦听器protected JComponenteastPane东面板protected JInternalFrameframe帧protected MouseInputListenerglassPaneDispatcher玻璃窗格调度器protected LayoutManagerinternalFrameLayout内部框架布局protected JComponentnorthPane北面protected KeyStrokeopenMenuKey已过时。从Java 2平台v1.3开始。protected PropertyChangeListenerpropertyChangeListener属性更改侦听器protected JComponentsouthPane南窗格protected BasicInternalFrameTitlePanetitlePane标题窗格protected JComponentwestPane西面
-
构造方法摘要
构造方法 Constructor 描述 BasicInternalFrameUI(JInternalFrame b)构造一个BasicInternalFrameUI。
-
方法摘要
所有方法 静态方法 接口方法 具体的方法 Modifier and Type 方法 描述 protected voidactivateFrame(JInternalFrame f)当框架被选中时调用此方法。protected voidcloseFrame(JInternalFrame f)当用户想要关闭框架时调用此方法。protected MouseInputAdaptercreateBorderListener(JInternalFrame w)创建边框侦听器。protected ComponentListenercreateComponentListener()创建组件侦听器。protected DesktopManagercreateDesktopManager()创建桌面管理器。protected JComponentcreateEastPane(JInternalFrame w)创建东面板。protected MouseInputListenercreateGlassPaneDispatcher()创建一个GlassPaneDispatcher。protected voidcreateInternalFrameListener()创建内部框架监听器。protected LayoutManagercreateLayoutManager()创建布局管理器。protected JComponentcreateNorthPane(JInternalFrame w)创建北面的窗格。protected PropertyChangeListenercreatePropertyChangeListener()创建属性更改侦听器。protected JComponentcreateSouthPane(JInternalFrame w)创建北面的窗格。static ComponentUIcreateUI(JComponent b)返回组件UI。protected JComponentcreateWestPane(JInternalFrame w)创建西窗格。protected voiddeactivateFrame(JInternalFrame f)当不再选择帧时调用此方法。protected voiddeiconifyFrame(JInternalFrame f)当用户想要对该帧进行解码时,会调用此方法。protected voiddeinstallMouseHandlers(JComponent c)卸载鼠标处理程序。protected DesktopManagergetDesktopManager()返回正确的DesktopManager。JComponentgetEastPane()返回东面。DimensiongetMaximumSize(JComponent x)返回最大大小。DimensiongetMinimumSize(JComponent x)返回最小大小。JComponentgetNorthPane()返回北面。DimensiongetPreferredSize(JComponent x)返回首选大小。JComponentgetSouthPane()返回南面。JComponentgetWestPane()返回西面。protected voidiconifyFrame(JInternalFrame f)当用户想要图标化帧时调用此方法。protected voidinstallComponents()安装组件。protected voidinstallDefaults()安装默认值。protected voidinstallKeyboardActions()安装键盘操作。protected voidinstallListeners()安装侦听器protected voidinstallMouseHandlers(JComponent c)安装鼠标处理程序。voidinstallUI(JComponent c)安装UIbooleanisKeyBindingActive()返回是否激活密钥绑定。protected booleanisKeyBindingRegistered()返回是否注册了键绑定。protected voidmaximizeFrame(JInternalFrame f)当用户想要最大化帧时调用此方法。protected voidminimizeFrame(JInternalFrame f)当用户想要最小化帧时调用此方法。protected voidreplacePane(JComponent currentPane, JComponent newPane)在newPane上安装必要的鼠标处理程序,并将其添加到框架中。voidsetEastPane(JComponent c)设置东窗格。protected voidsetKeyBindingActive(boolean b)设置键绑定活动。protected voidsetKeyBindingRegistered(boolean b)设置密钥绑定注册。voidsetNorthPane(JComponent c)设置北面。voidsetSouthPane(JComponent c)设置南面。protected voidsetupMenuCloseKey()设置菜单关闭键。protected voidsetupMenuOpenKey()设置菜单打开键。voidsetWestPane(JComponent c)设置西窗格。protected voiduninstallComponents()卸载组件。protected voiduninstallDefaults()卸载默认值。protected voiduninstallKeyboardActions()卸载键盘操作。protected voiduninstallListeners()卸载侦听器。voiduninstallUI(JComponent c)卸载UI。-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, paint, update
-
-
-
-
字段详细信息
-
frame
protected JInternalFrame frame
帧
-
borderListener
protected MouseInputAdapter borderListener
边界听众
-
propertyChangeListener
protected PropertyChangeListener propertyChangeListener
属性更改侦听器
-
internalFrameLayout
protected LayoutManager internalFrameLayout
内部框架布局
-
componentListener
protected ComponentListener componentListener
组件侦听器
-
glassPaneDispatcher
protected MouseInputListener glassPaneDispatcher
玻璃窗格调度器
-
northPane
protected JComponent northPane
北面
-
southPane
protected JComponent southPane
南窗格
-
westPane
protected JComponent westPane
西面
-
eastPane
protected JComponent eastPane
东面板
-
titlePane
protected BasicInternalFrameTitlePane titlePane
标题窗格
-
openMenuKey
@Deprecated protected KeyStroke openMenuKey
已过时。 从Java 2平台v1.3开始。从Java 2平台v1.3起,这个以前未记录的字段已不再使用了。 密钥绑定现在由LookAndFeel定义,请参考密钥绑定规范了解更多详细信息。
-
-
构造方法详细信息
-
BasicInternalFrameUI
public BasicInternalFrameUI(JInternalFrame b)
构造一个BasicInternalFrameUI。- 参数
-
b- 内部框架
-
-
方法详细信息
-
createUI
public static ComponentUI createUI(JComponent b)
返回组件UI。- 参数
-
b- 一个组件 - 结果
- 组件UI
-
installUI
public void installUI(JComponent c)
安装UI
-
uninstallUI
public void uninstallUI(JComponent c)
卸载UI。- 重写:
-
uninstallUI在ComponentUI - 参数
-
c- 组件 - 另请参见:
-
ComponentUI.installUI(javax.swing.JComponent),JComponent.updateUI()
-
installDefaults
protected void installDefaults()
安装默认值。
-
installKeyboardActions
protected void installKeyboardActions()
安装键盘操作。
-
installComponents
protected void installComponents()
安装组件。
-
installListeners
protected void installListeners()
安装侦听器- 从以下版本开始:
- 1.3
-
uninstallDefaults
protected void uninstallDefaults()
卸载默认值。
-
uninstallComponents
protected void uninstallComponents()
卸载组件。
-
uninstallListeners
protected void uninstallListeners()
卸载侦听器。- 从以下版本开始:
- 1.3
-
uninstallKeyboardActions
protected void uninstallKeyboardActions()
卸载键盘操作。
-
createLayoutManager
protected LayoutManager createLayoutManager()
创建布局管理器。- 结果
- 布局管理器
-
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener()
创建属性更改侦听器。- 结果
- 属性更改侦听器
-
getPreferredSize
public Dimension getPreferredSize(JComponent x)
返回首选大小。- 重写:
-
getPreferredSize在ComponentUI - 参数
-
x- 组件 - 结果
- 优选尺寸
- 另请参见:
-
JComponent.getPreferredSize(),LayoutManager.preferredLayoutSize(java.awt.Container)
-
getMinimumSize
public Dimension getMinimumSize(JComponent x)
返回最小大小。
-
getMaximumSize
public Dimension getMaximumSize(JComponent x)
返回最大大小。- 重写:
-
getMaximumSize在ComponentUI - 参数
-
x- 组件 - 结果
- 最大尺寸
- 另请参见:
-
JComponent.getMaximumSize(),LayoutManager2.maximumLayoutSize(java.awt.Container)
-
replacePane
protected void replacePane(JComponent currentPane, JComponent newPane)
在newPane上安装必要的鼠标处理程序,并将其添加到框架中。 反向过程为currentPane。- 参数
-
currentPane- 此Jcomponent是正在查看的当前窗格,已安装鼠标处理程序 -
newPane- 此Jcomponent是将被添加并安装鼠标处理程序的窗格
-
deinstallMouseHandlers
protected void deinstallMouseHandlers(JComponent c)
卸载鼠标处理程序。- 参数
-
c- 组件
-
installMouseHandlers
protected void installMouseHandlers(JComponent c)
安装鼠标处理程序。- 参数
-
c- 组件
-
createNorthPane
protected JComponent createNorthPane(JInternalFrame w)
创建北面的窗格。- 参数
-
w- 内部框架 - 结果
- 北面
-
createSouthPane
protected JComponent createSouthPane(JInternalFrame w)
创建北面的窗格。- 参数
-
w- 内部框架 - 结果
- 北面
-
createWestPane
protected JComponent createWestPane(JInternalFrame w)
创建西窗格。- 参数
-
w- 内部框架 - 结果
- 西面
-
createEastPane
protected JComponent createEastPane(JInternalFrame w)
创建东面板。- 参数
-
w- 内部框架 - 结果
- 东面
-
createBorderListener
protected MouseInputAdapter createBorderListener(JInternalFrame w)
创建边框侦听器。- 参数
-
w- 内部框架 - 结果
- 边界听众
-
createInternalFrameListener
protected void createInternalFrameListener()
创建内部框架监听器。
-
isKeyBindingRegistered
protected final boolean isKeyBindingRegistered()
返回是否注册了键绑定。- 结果
- 是否注册密钥绑定
-
setKeyBindingRegistered
protected final void setKeyBindingRegistered(boolean b)
设置密钥绑定注册。- 参数
-
b- 键绑定注册的新值
-
isKeyBindingActive
public final boolean isKeyBindingActive()
返回是否激活密钥绑定。- 结果
- 密钥绑定是否有效
-
setKeyBindingActive
protected final void setKeyBindingActive(boolean b)
设置键绑定活动。- 参数
-
b- 关键绑定活动的新值
-
setupMenuOpenKey
protected void setupMenuOpenKey()
设置菜单打开键。
-
setupMenuCloseKey
protected void setupMenuCloseKey()
设置菜单关闭键。
-
getNorthPane
public JComponent getNorthPane()
返回北面。- 结果
- 北面
-
setNorthPane
public void setNorthPane(JComponent c)
设置北面。- 参数
-
c- 新北面
-
getSouthPane
public JComponent getSouthPane()
返回南面。- 结果
- 南面
-
setSouthPane
public void setSouthPane(JComponent c)
设置南面。- 参数
-
c- 新的南面
-
getWestPane
public JComponent getWestPane()
返回西面。- 结果
- 西面
-
setWestPane
public void setWestPane(JComponent c)
设置西窗格。- 参数
-
c- 新的西面
-
getEastPane
public JComponent getEastPane()
返回东面。- 结果
- 东面
-
setEastPane
public void setEastPane(JComponent c)
设置东窗格。- 参数
-
c- 新的东面
-
getDesktopManager
protected DesktopManager getDesktopManager()
返回正确的DesktopManager。 调用getDesktopPane()来查找JDesktop组件并从中返回desktopManager。 如果失败,它将返回默认的DesktopManager,该默认桌面管理器应该在任意父项中使用。- 结果
- 正确的DesktopManager
-
createDesktopManager
protected DesktopManager createDesktopManager()
创建桌面管理器。- 结果
- 桌面管理器
-
closeFrame
protected void closeFrame(JInternalFrame f)
当用户想要关闭框架时调用此方法。playCloseSound操作被触发。 将此操作委派给desktopManager。- 参数
-
f- 正在查看JInternalFrame
-
maximizeFrame
protected void maximizeFrame(JInternalFrame f)
当用户想要最大化帧时调用此方法。playMaximizeSound操作被触发。 将此操作委派给desktopManager。- 参数
-
f- 正在查看JInternalFrame
-
minimizeFrame
protected void minimizeFrame(JInternalFrame f)
当用户想要最小化帧时调用此方法。playRestoreDownSound动作被解雇。 将此操作委派给desktopManager。- 参数
-
f- 正在查看JInternalFrame
-
iconifyFrame
protected void iconifyFrame(JInternalFrame f)
当用户想要图标化帧时调用此方法。playMinimizeSound动作被解雇。 将此操作委派给desktopManager。- 参数
-
f- 正在查看JInternalFrame
-
deiconifyFrame
protected void deiconifyFrame(JInternalFrame f)
当用户想要对该帧进行解码时,会调用此方法。playRestoreUpSound操作被触发。 将此操作委派给desktopManager。- 参数
-
f- 正在查看JInternalFrame
-
activateFrame
protected void activateFrame(JInternalFrame f)
当框架被选中时调用此方法。 将此操作委派给desktopManager。- 参数
-
f- 被观看的JInternalFrame
-
deactivateFrame
protected void deactivateFrame(JInternalFrame f)
当不再选择帧时调用此方法。 将此操作委派给desktopManager。- 参数
-
f- 正在查看JInternalFrame
-
createComponentListener
protected ComponentListener createComponentListener()
创建组件侦听器。- 结果
- 组件侦听器
-
createGlassPaneDispatcher
protected MouseInputListener createGlassPaneDispatcher()
创建一个GlassPaneDispatcher。- 结果
-
一个
GlassPaneDispatcher
-
-