java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.plaf.basic.BasicInternalFrameTitlePane
- 所有已实现的接口:
ImageObserver,MenuContainer,Serializable
管理基本标题栏的类
Warning: 此类的序列化对象将与未来的 Swing 版本不兼容。当前的序列化支持适用于运行相同版本 Swing 的应用程序之间的短期存储或 RMI。从 1.4 开始,对所有 JavaBeans 的长期存储的支持已添加到 java.beans 包中。请参阅 XMLEncoder 。
-
内部类总结
内部类修饰符和类型类描述class此类应被视为“受保护”的内部类。class此类应被视为“受保护”的内部类。class此类应被视为“受保护”的内部类。class此类应被视为“受保护”的内部类。class此类应被视为“受保护”的内部类。class此类应被视为“受保护”的内部类。class此类应被视为“受保护”的内部类。class此类应被视为“受保护”的内部类。class此类应被视为“受保护”的内部类。在类 javax.swing.JComponent 中声明的嵌套类/接口
JComponent.AccessibleJComponent在类 java.awt.Container 中声明的嵌套类/接口
Container.AccessibleAWTContainer -
字段摘要
字段修饰符和类型Field描述protected static final String关闭按钮文本属性。protected ActionCloseAction的实例。protected JButton关闭按钮。protected Icon关闭图标。protected JInternalFrameJInternalFrame的实例。protected JButton图标化按钮。protected Icon图标化图标。protected static final String最小化按钮文本属性。protected ActionIconifyAction的实例。protected JButton最大化按钮。protected Icon最大化图标。protected static final String最大化按钮文本属性。protected ActionMaximizeAction的实例。protected JMenuBarJMenuBar的实例。protected Icon最小化图标。protected static final String移动按钮文本属性。protected ActionMoveAction的实例。protected Color未选中文本的颜色。protected Color未选中标题的颜色。protected PropertyChangeListenerPropertyChangeListener的实例。protected static final String恢复按钮文本属性。protected ActionRestoreAction的实例。protected Color所选文本的颜色。protected Color所选标题的颜色。protected static final String大小按钮文本属性。protected ActionSizeAction的实例。protected JMenuJMenu的实例。在类 javax.swing.JComponent 中声明的字段
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW在类 java.awt.Component 中声明的字段
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT在接口 java.awt.image.ImageObserver 中声明的字段
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
构造方法总结
构造方法 -
方法总结
修饰符和类型方法描述protected void添加子组件。protected voidaddSystemMenuItems(JMenu systemMenu) 将系统菜单项添加到systemMenu。protected void组装系统菜单。protected void创建动作。protected void创建按钮。protected LayoutManager返回布局管理器。protected PropertyChangeListener返回PropertyChangeListener的实例。protected JMenu返回JMenu的新实例。protected JMenuBar返回JMenuBar的新实例。protected void启用操作。protected StringgetTitle(String text, FontMetrics fm, int availTextWidth) 返回标题。protected void安装默认属性。protected void注册听众。protected void安装标题窗格。void如果 UI 委托是非null,则调用 UI 委托的绘制方法。protected void从 paintComponent 调用。protected voidpostClosingEvent(JInternalFrame frame) 将类似 WINDOW_CLOSING 的事件发布到框架,以便可以将其视为常规Frame。protected void设置按钮图标。protected void显示系统菜单。protected void卸载默认属性。protected void注销听众。在类 javax.swing.JComponent 中声明的方法
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI在类 java.awt.Container 中声明的方法
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree在类 java.awt.Component 中声明的方法
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
字段详细信息
-
iconButton
图标化按钮。 -
maxButton
最大化按钮。 -
closeButton
关闭按钮。 -
windowMenu
JMenu的实例。 -
frame
JInternalFrame的实例。 -
selectedTitleColor
所选标题的颜色。 -
selectedTextColor
所选文本的颜色。 -
notSelectedTitleColor
未选中标题的颜色。 -
notSelectedTextColor
未选中文本的颜色。 -
maxIcon
最大化图标。 -
minIcon
最小化图标。 -
iconIcon
图标化图标。 -
closeIcon
关闭图标。 -
propertyChangeListener
PropertyChangeListener的实例。 -
closeAction
CloseAction的实例。 -
maximizeAction
MaximizeAction的实例。 -
iconifyAction
IconifyAction的实例。 -
restoreAction
RestoreAction的实例。 -
moveAction
MoveAction的实例。 -
sizeAction
SizeAction的实例。 -
CLOSE_CMD
关闭按钮文本属性。 -
ICONIFY_CMD
最小化按钮文本属性。 -
RESTORE_CMD
恢复按钮文本属性。 -
MAXIMIZE_CMD
最大化按钮文本属性。 -
MOVE_CMD
移动按钮文本属性。 -
SIZE_CMD
大小按钮文本属性。
-
构造方法详细信息
-
BasicInternalFrameTitlePane
构造一个BasicInternalFrameTitlePane新实例- 参数:
f-JInternalFrame的实例
-
-
方法详情
-
installTitlePane
protected void installTitlePane()安装标题窗格。 -
addSubComponents
protected void addSubComponents()添加子组件。 -
createActions
protected void createActions()创建动作。 -
installListeners
protected void installListeners()注册听众。 -
uninstallListeners
protected void uninstallListeners()注销听众。 -
installDefaults
protected void installDefaults()安装默认属性。 -
uninstallDefaults
protected void uninstallDefaults()卸载默认属性。 -
createButtons
protected void createButtons()创建按钮。 -
setButtonIcons
protected void setButtonIcons()设置按钮图标。 -
assembleSystemMenu
protected void assembleSystemMenu()组装系统菜单。 -
addSystemMenuItems
将系统菜单项添加到systemMenu。- 参数:
systemMenu-JMenu的实例
-
createSystemMenu
返回JMenu的新实例。- 返回:
JMenu的新实例
-
createSystemMenuBar
返回JMenuBar的新实例。- 返回:
JMenuBar的新实例
-
showSystemMenu
protected void showSystemMenu()显示系统菜单。 -
paintComponent
从类复制的描述:JComponent如果 UI 委托是非null,则调用 UI 委托的绘制方法。我们将Graphics对象的副本传递给委托,以保护其余的绘制代码免受不可撤销的更改(例如,Graphics.translate)。如果您在子类中重写它,则不应对传入的
Graphics进行永久更改。例如,您不应更改剪辑Rectangle或修改变换。如果您需要执行这些操作,您可能会发现从传入的Graphics创建一个新的Graphics并对其进行操作会更容易。此外,如果您不调用 super 的实现,则必须遵守不透明属性,也就是说,如果此组件是不透明的,则必须用不透明的颜色完全填充背景。如果您不尊重不透明属性,您可能会看到视觉伪影。传入的
Graphics对象可能具有安装在其上的识别转换以外的转换。在这种情况下,如果您累积应用另一个转换,您可能会得到意想不到的结果。- 重写:
paintComponent在类JComponent中- 参数:
g- 要保护的Graphics对象- 参见:
-
paintTitleBackground
从 paintComponent 调用。绘制标题窗格的背景。然后所有文本和图标都将在此背景之上呈现。- 参数:
g- 用于渲染背景的图形- 自从:
- 1.4
-
getTitle
返回标题。- 参数:
text- 一段文字fm-FontMetrics的实例availTextWidth- 可用的文本宽度- 返回:
- 标题。
-
postClosingEvent
将类似 WINDOW_CLOSING 的事件发布到框架,以便可以将其视为常规Frame。- 参数:
frame-JInternalFrame的实例
-
enableActions
protected void enableActions()启用操作。 -
createPropertyChangeListener
返回PropertyChangeListener的实例。- 返回:
PropertyChangeListener的实例
-
createLayout
返回布局管理器。- 返回:
- 布局管理器
-