- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.plaf.basic.BasicInternalFrameTitlePane
-
- javax.swing.plaf.metal.MetalInternalFrameTitlePane
-
- All Implemented Interfaces:
-
ImageObserver
,MenuContainer
,Serializable
public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
管理JLF标题栏的类- 从以下版本开始:
- 1.3
- 另请参见:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicInternalFrameTitlePane
BasicInternalFrameTitlePane.CloseAction, BasicInternalFrameTitlePane.IconifyAction, BasicInternalFrameTitlePane.MaximizeAction, BasicInternalFrameTitlePane.MoveAction, BasicInternalFrameTitlePane.PropertyChangeHandler, BasicInternalFrameTitlePane.RestoreAction, BasicInternalFrameTitlePane.SizeAction, BasicInternalFrameTitlePane.SystemMenuBar, BasicInternalFrameTitlePane.TitlePaneLayout
-
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field 描述 protected boolean
isPalette
值isPalette
protected Icon
paletteCloseIcon
调色板关闭图标。protected int
paletteTitleHeight
调色板标题的高度。-
Fields inherited from class javax.swing.plaf.basic.BasicInternalFrameTitlePane
CLOSE_CMD, closeAction, closeButton, closeIcon, frame, iconButton, iconIcon, ICONIFY_CMD, iconifyAction, maxButton, maxIcon, MAXIMIZE_CMD, maximizeAction, menuBar, minIcon, MOVE_CMD, moveAction, notSelectedTextColor, notSelectedTitleColor, propertyChangeListener, RESTORE_CMD, restoreAction, selectedTextColor, selectedTitleColor, SIZE_CMD, sizeAction, windowMenu
-
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
构造方法摘要
构造方法 Constructor 描述 MetalInternalFrameTitlePane(JInternalFrame f)
构造一个新的实例MetalInternalFrameTitlePane
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 void
addNotify()
通知此组件它现在有一个父组件。protected void
addSubComponents()
覆盖父方法避免创建菜单栏。protected void
addSystemMenuItems(JMenu systemMenu)
覆盖父方法,不做任何操作。protected void
assembleSystemMenu()
覆盖父方法,不做任何操作。protected void
createButtons()
创建按钮。protected LayoutManager
createLayout()
返回布局管理器。protected PropertyChangeListener
createPropertyChangeListener()
返回一个PropertyChangeListener
的实例。protected void
installDefaults()
安装默认属性。void
paintComponent(Graphics g)
调用UInull
的paint方法,如果UInull
。void
paintPalette(Graphics g)
油漆调色板void
setPalette(boolean b)
如果b
是true
,请设置调色板图标。protected void
showSystemMenu()
覆盖父方法,不做任何操作。protected void
uninstallDefaults()
卸载默认属性。-
Methods inherited from class javax.swing.plaf.basic.BasicInternalFrameTitlePane
createActions, createSystemMenu, createSystemMenuBar, enableActions, getTitle, installListeners, installTitlePane, paintTitleBackground, postClosingEvent, setButtonIcons, uninstallListeners
-
Methods inherited from class 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, 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
-
Methods inherited from class 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
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, 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
-
-
-
-
字段详细信息
-
isPalette
protected boolean isPalette
值isPalette
-
paletteCloseIcon
protected Icon paletteCloseIcon
调色板关闭图标。
-
paletteTitleHeight
protected int paletteTitleHeight
调色板标题的高度。
-
-
构造方法详细信息
-
MetalInternalFrameTitlePane
public MetalInternalFrameTitlePane(JInternalFrame f)
构造一个新的实例MetalInternalFrameTitlePane
- 参数
-
f
-实例JInternalFrame
-
-
方法详细信息
-
addNotify
public void addNotify()
说明从类别复制:JComponent
通知此组件它现在有一个父组件。 调用此方法时,父组件链将使用KeyboardAction
事件侦听器进行设置。 该方法在内部被工具包调用,不应该被程序直接调用。
-
installDefaults
protected void installDefaults()
描述从类复制:BasicInternalFrameTitlePane
安装默认属性。
-
uninstallDefaults
protected void uninstallDefaults()
描述从类复制:BasicInternalFrameTitlePane
卸载默认属性。
-
createButtons
protected void createButtons()
描述从类别复制:BasicInternalFrameTitlePane
创建按钮。
-
assembleSystemMenu
protected void assembleSystemMenu()
覆盖父方法,不做任何操作。 金属框架没有系统菜单。
-
addSystemMenuItems
protected void addSystemMenuItems(JMenu systemMenu)
覆盖父方法,不做任何操作。 金属框架没有系统菜单。- 重写:
-
addSystemMenuItems
在BasicInternalFrameTitlePane
- 参数
-
systemMenu
-实例JMenu
-
showSystemMenu
protected void showSystemMenu()
覆盖父方法,不做任何操作。 金属框架没有系统菜单。
-
addSubComponents
protected void addSubComponents()
覆盖父方法避免创建菜单栏。 金属框架没有系统菜单。
-
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener()
描述从类复制:BasicInternalFrameTitlePane
返回一个PropertyChangeListener
的实例。- 重写:
-
createPropertyChangeListener
在BasicInternalFrameTitlePane
- 结果
-
一个
PropertyChangeListener
-
createLayout
protected LayoutManager createLayout()
描述从类复制:BasicInternalFrameTitlePane
返回布局管理器。- 重写:
-
createLayout
在BasicInternalFrameTitlePane
- 结果
- 布局管理器
-
paintPalette
public void paintPalette(Graphics g)
油漆调色板- 参数
-
g
-的实例Graphics
-
paintComponent
public void paintComponent(Graphics g)
描述从类复制:JComponent
调用UInull
的paint方法,如果UInull
。 我们通过委托一份Graphics
对象的副本,以保护其他油漆代码免受不可撤销的更改(例如,Graphics.translate
)。如果你在一个子类中重写这个,你不应该对
Graphics
的传递进行永久的更改。 例如,您不应该更改剪辑Rectangle
或修改转换。 如果您需要执行这些操作,您可能会发现从Graphics
中传递的操作更容易创建一个新的Graphics
并进行操作。 此外,如果您不调用super的实现,则必须遵守不透明属性,即如果此组件不透明,则必须以非不透明颜色完全填写背景。 如果您不遵守不透明属性,您将可能会看到视觉工件。在
Graphics
对象中传递的对象可能具有除安装的标识变换之外的变换。 在这种情况下,如果累积应用另一个变换,您可能会得到意想不到的结果。- 重写:
-
paintComponent
在BasicInternalFrameTitlePane
- 参数
-
g
- 要保护的Graphics
对象 - 另请参见:
-
JComponent.paint(java.awt.Graphics)
,ComponentUI
-
setPalette
public void setPalette(boolean b)
如果b
是true
,请设置调色板图标。- 参数
-
b
- 如果是true
,则设置调色板图标
-
-