public class BasicMenuUI extends BasicMenuItemUI
| Modifier and Type | Class and Description |
|---|---|
class |
BasicMenuUI
As of Java 2 platform 1.4, this previously undocumented class is now obsolete.
|
protected class |
BasicMenuUI
Instantiated and used by a menu item to handle the current menu selection from mouse events.
|
| 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
|
protected MenuDragMouseListener |
createMenuDragMouseListener(JComponent
|
protected MenuKeyListener |
createMenuKeyListener(JComponent
|
protected MenuListener |
createMenuListener(JComponent
|
protected MouseInputListener |
createMouseInputListener(JComponent
|
protected PropertyChangeListener |
createPropertyChangeListener(JComponent
Creates a
PropertyChangeListener which will be added to the menu item.
|
static ComponentUI |
createUI(JComponent
|
Dimension |
getMaximumSize(JComponent
Returns the specified component's maximum size appropriate for the look and feel.
|
protected String |
getPropertyPrefix()
|
protected void |
installDefaults()
|
protected void |
installKeyboardActions()
|
protected void |
installListeners()
|
protected void |
setupPostTimer(JMenu
|
protected void |
uninstallDefaults()
|
protected void |
uninstallKeyboardActions()
|
protected void |
uninstallListeners()
|
doClick, getMinimumSize, getPath, getPreferredMenuItemSize, getPreferredSize, installComponents, installUI, paint, paintBackground, paintMenuItem, paintText, uninstallComponents, uninstallUI, updatecontains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehaviorprotected ChangeListenerchangeListener
protected MenuListenermenuListener
public static ComponentUIcreateUI(JComponent x)
protected void installDefaults()
protected StringgetPropertyPrefix()
protected void installListeners()
protected void installKeyboardActions()
protected void uninstallKeyboardActions()
protected MouseInputListenercreateMouseInputListener(JComponent c)
protected MenuListenercreateMenuListener(JComponent c)
protected ChangeListenercreateChangeListener(JComponent c)
protected PropertyChangeListenercreatePropertyChangeListener(JComponent c)
BasicMenuItemUI
PropertyChangeListener which will be added to the menu item. If this method returns null then it will not be added to the menu item.
createPropertyChangeListener in class
BasicMenuItemUI
PropertyChangeListener or null
protected void uninstallDefaults()
protected void uninstallListeners()
protected MenuDragMouseListenercreateMenuDragMouseListener(JComponent c)
protected MenuKeyListenercreateMenuKeyListener(JComponent c)
public DimensiongetMaximumSize(JComponent c)
ComponentUI
null is returned, the maximum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes
getPreferredSize and returns that value.
getMaximumSize in class
BasicMenuItemUI
c - the component whose maximum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Dimension object or
null
JComponent.getMaximumSize() ,
LayoutManager2.maximumLayoutSize(java.awt.Container)
protected void setupPostTimer(JMenumenu)