©
Dokumen ini menggunakan Manual laman web PHP Cina Lepaskan
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.plaf.basic.BasicInternalFrameTitlePane
public class BasicInternalFrameTitlePane
管理基本标题栏的类
警告:此类的序列化对象将与以后的 Swing 版本不兼容。当前的序列化支持适用于短期存储或运行相同 Swing 版本的应用程序之间的 RMI。从 1.4 版本开始,已在 java.beans
包中添加了支持所有 JavaBeansTM 长期存储的功能。请参见 XMLEncoder
。
嵌套类摘要 | |
---|---|
class |
BasicInternalFrameTitlePane.CloseAction
此类应视为“受保护”内部类。 |
class |
BasicInternalFrameTitlePane.IconifyAction
此类应视为“受保护”内部类。 |
class |
BasicInternalFrameTitlePane.MaximizeAction
此类应视为“受保护”内部类。 |
class |
BasicInternalFrameTitlePane.MoveAction
此类应视为“受保护”内部类。 |
class |
BasicInternalFrameTitlePane.PropertyChangeHandler
此类应视为“受保护”内部类。 |
class |
BasicInternalFrameTitlePane.RestoreAction
此类应视为“受保护”内部类。 |
class |
BasicInternalFrameTitlePane.SizeAction
此类应视为“受保护”内部类。 |
class |
BasicInternalFrameTitlePane.SystemMenuBar
此类应视为“受保护”内部类。 |
class |
BasicInternalFrameTitlePane.TitlePaneLayout
此类应视为“受保护”内部类。 |
从类 javax.swing.JComponent 继承的嵌套类/接口 |
---|
JComponent.AccessibleJComponent |
从类 java.awt.Container 继承的嵌套类/接口 |
---|
Container.AccessibleAWTContainer |
从类 java.awt.Component 继承的嵌套类/接口 |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
字段摘要 | |
---|---|
protected static String |
CLOSE_CMD
|
protected Action |
closeAction
|
protected JButton |
closeButton
|
protected Icon |
closeIcon
|
protected JInternalFrame |
frame
|
protected JButton |
iconButton
|
protected Icon |
iconIcon
|
protected static String |
ICONIFY_CMD
|
protected Action |
iconifyAction
|
protected JButton |
maxButton
|
protected Icon |
maxIcon
|
protected static String |
MAXIMIZE_CMD
|
protected Action |
maximizeAction
|
protected JMenuBar |
menuBar
|
protected Icon |
minIcon
|
protected static String |
MOVE_CMD
|
protected Action |
moveAction
|
protected Color |
notSelectedTextColor
|
protected Color |
notSelectedTitleColor
|
protected PropertyChangeListener |
propertyChangeListener
|
protected static String |
RESTORE_CMD
|
protected Action |
restoreAction
|
protected Color |
selectedTextColor
|
protected Color |
selectedTitleColor
|
protected static String |
SIZE_CMD
|
protected Action |
sizeAction
|
protected JMenu |
windowMenu
|
从类 javax.swing.JComponent 继承的字段 |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
从类 java.awt.Component 继承的字段 |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
从接口 java.awt.image.ImageObserver 继承的字段 |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
构造方法摘要 | |
---|---|
BasicInternalFrameTitlePane(JInternalFrame f)
|
方法摘要 | |
---|---|
protected void |
addSubComponents()
|
protected void |
addSystemMenuItems(JMenu systemMenu)
|
protected void |
assembleSystemMenu()
|
protected void |
createActions()
|
protected void |
createButtons()
|
protected LayoutManager |
createLayout()
|
protected PropertyChangeListener |
createPropertyChangeListener()
|
protected JMenu |
createSystemMenu()
|
protected JMenuBar |
createSystemMenuBar()
|
protected void |
enableActions()
|
protected String |
getTitle(String text,
FontMetrics fm,
int availTextWidth)
|
protected void |
installDefaults()
|
protected void |
installListeners()
|
protected void |
installTitlePane()
|
void |
paintComponent(Graphics g)
如果 UI 委托为非 null ,则调用该 UI 委托的 paint 方法。 |
protected void |
paintTitleBackground(Graphics g)
从 paintComponent 调用。 |
protected void |
postClosingEvent(JInternalFrame frame)
将类似于 WINDOW_CLOSING 的事件发送到窗体,以便将其当作规则的 Frame 来对待。 |
protected void |
setButtonIcons()
|
protected void |
showSystemMenu()
|
protected void |
uninstallDefaults()
|
protected void |
uninstallListeners()
|
从类 javax.swing.JComponent 继承的方法 |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, transferFocusBackward, 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, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
字段详细信息 |
---|
protected JMenuBar menuBar
protected JButton iconButton
protected JButton maxButton
protected JButton closeButton
protected JMenu windowMenu
protected JInternalFrame frame
protected Color selectedTitleColor
protected Color selectedTextColor
protected Color notSelectedTitleColor
protected Color notSelectedTextColor
protected Icon maxIcon
protected Icon minIcon
protected Icon iconIcon
protected Icon closeIcon
protected PropertyChangeListener propertyChangeListener
protected Action closeAction
protected Action maximizeAction
protected Action iconifyAction
protected Action restoreAction
protected Action moveAction
protected Action sizeAction
protected static final String CLOSE_CMD
protected static final String ICONIFY_CMD
protected static final String RESTORE_CMD
protected static final String MAXIMIZE_CMD
protected static final String MOVE_CMD
protected static final String SIZE_CMD
构造方法详细信息 |
---|
public BasicInternalFrameTitlePane(JInternalFrame f)
方法详细信息 |
---|
protected void installTitlePane()
protected void addSubComponents()
protected void createActions()
protected void installListeners()
protected void uninstallListeners()
protected void installDefaults()
protected void uninstallDefaults()
protected void createButtons()
protected void setButtonIcons()
protected void assembleSystemMenu()
protected void addSystemMenuItems(JMenu systemMenu)
protected JMenu createSystemMenu()
protected JMenuBar createSystemMenuBar()
protected void showSystemMenu()
public void paintComponent(Graphics g)
JComponent
复制的描述null
,则调用该 UI 委托的 paint 方法。向该委托传递 Graphics
对象的副本,以保护其余的 paint 代码免遭不可取消的更改(例如 Graphics.translate
)。
如果在子类中重写此方法,则不应该对传入的 Graphics
进行永久更改。例如,不应更改剪贴区的 Rectangle
或修改转换。如果需要进行这些操作,您会发现根据传入的 Graphics
创建一个新 Graphics
并进行操作更加方便。另外,如果不调用超类的实现,则必须遵守不透明属性,也就是说,如果此组件是不透明的,则必须以透明的颜色完全填充背景。如果不遵守不透明属性,则很可能看到可视的人为内容。
传入的 Graphics
对象可能安装了恒等转换以外的转换。在这种情况下,如果多次应用其他转换,则可能得到不可预料的结果。
JComponent
中的 paintComponent
g
- 要保护的 Graphics
对象JComponent.paint(java.awt.Graphics)
,
ComponentUI
protected void paintTitleBackground(Graphics g)
g
- 用于呈现背景的图形protected String getTitle(String text, FontMetrics fm, int availTextWidth)
protected void postClosingEvent(JInternalFrame frame)
protected void enableActions()
protected PropertyChangeListener createPropertyChangeListener()
protected LayoutManager createLayout()
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。