public class BasicMenuUI extends BasicMenuItemUI
Modifier and Type | Class and Description |
---|---|
class |
BasicMenuUI.ChangeHandler
作为java 2平台1.4,这个以前无证类现在已经过时了。
|
protected class |
BasicMenuUI.MouseInputHandler
实例化并通过菜单项用来从鼠标事件处理当前菜单选择。
|
Modifier and Type | Field and Description |
---|---|
protected ChangeListener |
changeListener |
protected MenuListener |
menuListener |
acceleratorDelimiter, acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, propertyChangeListener, selectionBackground, selectionForeground
Constructor and Description |
---|
BasicMenuUI() |
Modifier and Type | Method and Description |
---|---|
protected ChangeListener |
createChangeListener(JComponent c) |
protected MenuDragMouseListener |
createMenuDragMouseListener(JComponent c) |
protected MenuKeyListener |
createMenuKeyListener(JComponent c) |
protected MenuListener |
createMenuListener(JComponent c) |
protected MouseInputListener |
createMouseInputListener(JComponent c) |
protected PropertyChangeListener |
createPropertyChangeListener(JComponent c)
创建一个
PropertyChangeListener 将被添加到菜单项。
|
static ComponentUI |
createUI(JComponent x) |
Dimension |
getMaximumSize(JComponent c)
返回指定组件的最大大小适合的外观和感觉。
|
protected String |
getPropertyPrefix() |
protected void |
installDefaults() |
protected void |
installKeyboardActions() |
protected void |
installListeners() |
protected void |
setupPostTimer(JMenu menu) |
protected void |
uninstallDefaults() |
protected void |
uninstallKeyboardActions() |
protected void |
uninstallListeners() |
doClick, getMinimumSize, getPath, getPreferredMenuItemSize, getPreferredSize, installComponents, installUI, paint, paintBackground, paintMenuItem, paintText, uninstallComponents, uninstallUI, update
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
protected ChangeListener changeListener
protected MenuListener menuListener
public static ComponentUI createUI(JComponent x)
protected void installDefaults()
installDefaults
方法重写,继承类
BasicMenuItemUI
protected String getPropertyPrefix()
getPropertyPrefix
方法重写,继承类
BasicMenuItemUI
protected void installListeners()
installListeners
方法重写,继承类
BasicMenuItemUI
protected void installKeyboardActions()
installKeyboardActions
方法重写,继承类
BasicMenuItemUI
protected void uninstallKeyboardActions()
uninstallKeyboardActions
方法重写,继承类
BasicMenuItemUI
protected MouseInputListener createMouseInputListener(JComponent c)
createMouseInputListener
方法重写,继承类
BasicMenuItemUI
protected MenuListener createMenuListener(JComponent c)
protected ChangeListener createChangeListener(JComponent c)
protected PropertyChangeListener createPropertyChangeListener(JComponent c)
BasicMenuItemUI
PropertyChangeListener
将被添加到菜单项。如果此方法返回的空值,则不会添加到菜单项中。
createPropertyChangeListener
方法重写,继承类
BasicMenuItemUI
PropertyChangeListener
或空的实例
protected void uninstallDefaults()
uninstallDefaults
方法重写,继承类
BasicMenuItemUI
protected void uninstallListeners()
uninstallListeners
方法重写,继承类
BasicMenuItemUI
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)
createMenuDragMouseListener
方法重写,继承类
BasicMenuItemUI
protected MenuKeyListener createMenuKeyListener(JComponent c)
createMenuKeyListener
方法重写,继承类
BasicMenuItemUI
public Dimension getMaximumSize(JComponent c)
ComponentUI
null
返回,最大规模将由组件的布局管理器的计算(这是与一个特定的布局管理器安装任何组件的首选方法)。此方法的默认实现调用
getPreferredSize
和返回值。
getMaximumSize
方法重写,继承类
BasicMenuItemUI
c
-其最大尺寸被查询的成分;这种说法常常被忽视,但可能如果UI对象是无状态的,共享由多个组件
Dimension
对象或
null
JComponent.getMaximumSize()
,
LayoutManager2.maximumLayoutSize(java.awt.Container)
protected void setupPostTimer(JMenu menu)
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.