public class BasicInternalFrameUI extends InternalFrameUI
Modifier and Type | Class and Description |
---|---|
protected class |
BasicInternalFrameUI.BasicInternalFrameListener |
protected class |
BasicInternalFrameUI.BorderListener
倾听边界调整。
|
protected class |
BasicInternalFrameUI.ComponentHandler |
protected class |
BasicInternalFrameUI.GlassPaneDispatcher |
class |
BasicInternalFrameUI.InternalFrameLayout |
class |
BasicInternalFrameUI.InternalFramePropertyChangeListener |
Modifier and Type | Field and Description |
---|---|
protected MouseInputAdapter |
borderListener |
protected ComponentListener |
componentListener |
protected JComponent |
eastPane |
protected JInternalFrame |
frame |
protected MouseInputListener |
glassPaneDispatcher |
protected LayoutManager |
internalFrameLayout |
protected JComponent |
northPane |
protected KeyStroke |
openMenuKey
已弃用
从Java 2平台v1.3开始。
|
protected PropertyChangeListener |
propertyChangeListener |
protected JComponent |
southPane |
protected BasicInternalFrameTitlePane |
titlePane |
protected JComponent |
westPane |
Constructor and Description |
---|
BasicInternalFrameUI(JInternalFrame b) |
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, paint, update
protected JInternalFrame frame
protected MouseInputAdapter borderListener
protected PropertyChangeListener propertyChangeListener
protected LayoutManager internalFrameLayout
protected ComponentListener componentListener
protected MouseInputListener glassPaneDispatcher
protected JComponent northPane
protected JComponent southPane
protected JComponent westPane
protected JComponent eastPane
protected BasicInternalFrameTitlePane titlePane
@Deprecated protected KeyStroke openMenuKey
public BasicInternalFrameUI(JInternalFrame b)
public static ComponentUI createUI(JComponent b)
public void installUI(JComponent c)
ComponentUI
ComponentUI
实例作为指定组件上的UI委托时,将调用此方法。
该方法应该完全配置组件的外观,包括以下内容:
LayoutManager
上安装LayoutManager。 PropertyChangeListener
上创建/安装PropertyChangeListener,以便适当地检测和响应组件属性的更改。 installUI
在
ComponentUI
类
c
- 安装此UI代理的组件
ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
ComponentUI
installUI
上完成的installUI
。
当将此UIComponent
实例作为指定组件的UI委托删除时,将调用此方法。
该方法应该撤消在installUI中执行的installUI
,小心使JComponent
实例处于干净状态(无外部侦听器,外观特定属性对象等)。
这应该包括以下内容:
uninstallUI
在
ComponentUI
c
- 从中删除此UI代理的组件;
这个参数经常被忽略,但如果UI对象是无状态的并且被多个组件共享,则可能会被使用
ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
protected void installDefaults()
protected void installKeyboardActions()
protected void installComponents()
protected void installListeners()
protected void uninstallDefaults()
protected void uninstallComponents()
protected void uninstallListeners()
protected void uninstallKeyboardActions()
protected LayoutManager createLayoutManager()
protected PropertyChangeListener createPropertyChangeListener()
public Dimension getPreferredSize(JComponent x)
ComponentUI
null
,则首选大小将由组件的布局管理器计算(这是安装了特定布局管理器的任何组件的首选方法)。
此方法的默认实现返回null
。
getPreferredSize
在
ComponentUI
x
- 要查询其首选大小的组件;
这个参数经常被忽略,但如果UI对象是无状态的并且被多个组件共享,则可能会被使用
JComponent.getPreferredSize()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension getMinimumSize(JComponent x)
ComponentUI
null
,则最小尺寸将由组件的布局管理器计算(这是安装了特定布局管理器的任何组件的首选方法)。
此方法的默认实现将调用getPreferredSize
并返回该值。
getMinimumSize
在
ComponentUI
x
- 正在查询最小大小的组件;
这个参数经常被忽略,但如果UI对象是无状态的并且被多个组件共享,则可能会被使用
Dimension
对象或
null
JComponent.getMinimumSize()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
ComponentUI.getPreferredSize(javax.swing.JComponent)
public Dimension getMaximumSize(JComponent x)
ComponentUI
null
,则最大大小将由组件的布局管理器计算(这是安装了特定布局管理器的任何组件的首选方法)。
此方法的默认实现将调用getPreferredSize
并返回该值。
getMaximumSize
在
ComponentUI
x
- 查询最大尺寸的组件;
这个参数经常被忽略,但如果UI对象是无状态的并且被多个组件共享,则可能会被使用
Dimension
对象或
null
JComponent.getMaximumSize()
,
LayoutManager2.maximumLayoutSize(java.awt.Container)
protected void replacePane(JComponent currentPane, JComponent newPane)
newPane
上安装必要的鼠标处理程序,并将其添加到框架中。
反向过程为currentPane
。
protected void deinstallMouseHandlers(JComponent c)
protected void installMouseHandlers(JComponent c)
protected JComponent createNorthPane(JInternalFrame w)
protected JComponent createSouthPane(JInternalFrame w)
protected JComponent createWestPane(JInternalFrame w)
protected JComponent createEastPane(JInternalFrame w)
protected MouseInputAdapter createBorderListener(JInternalFrame w)
protected void createInternalFrameListener()
protected final boolean isKeyBindingRegistered()
protected final void setKeyBindingRegistered(boolean b)
public final boolean isKeyBindingActive()
protected final void setKeyBindingActive(boolean b)
protected void setupMenuOpenKey()
protected void setupMenuCloseKey()
public JComponent getNorthPane()
public void setNorthPane(JComponent c)
public JComponent getSouthPane()
public void setSouthPane(JComponent c)
public JComponent getWestPane()
public void setWestPane(JComponent c)
public JComponent getEastPane()
public void setEastPane(JComponent c)
protected DesktopManager getDesktopManager()
protected DesktopManager createDesktopManager()
protected void closeFrame(JInternalFrame f)
playCloseSound
行动被解雇。
将此操作委派给desktopManager。
protected void maximizeFrame(JInternalFrame f)
playMaximizeSound
行动被解雇。
将此操作委派给desktopManager。
protected void minimizeFrame(JInternalFrame f)
playRestoreDownSound
行动被解雇。
将此操作委派给desktopManager。
protected void iconifyFrame(JInternalFrame f)
playMinimizeSound
动作被解雇。
将此操作委派给desktopManager。
protected void deiconifyFrame(JInternalFrame f)
playRestoreUpSound
行动被解雇。
将此操作委派给desktopManager。
protected void activateFrame(JInternalFrame f)
protected void deactivateFrame(JInternalFrame f)
protected ComponentListener createComponentListener()
protected MouseInputListener createGlassPaneDispatcher()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.