Spec-Zone .ru
спецификации, руководства, описания, API
|
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.plaf.ComponentUI javax.swing.plaf.ButtonUI javax.swing.plaf.MenuItemUI javax.swing.plaf.basic.BasicMenuItemUI javax.swing.plaf.basic.BasicMenuUI
public class BasicMenuUI extends BasicMenuItemUI
A default L&F implementation of MenuUI. This implementation is a "combined" view/controller.
Modifier and Type | Class and Description |
---|---|
class |
BasicMenuUI.ChangeHandler
As of Java 2 platform 1.4, this previously undocumented class is now obsolete. |
protected class |
BasicMenuUI.MouseInputHandler
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
|
Fields inherited from class javax.swing.plaf.basic.BasicMenuItemUI |
---|
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 MenuListener |
createMenuListener(JComponent c)
|
protected MouseInputListener |
createMouseInputListener(JComponent c)
|
protected PropertyChangeListener |
createPropertyChangeListener(JComponent c)
Creates a PropertyChangeListener which will be added to
the menu item. |
static ComponentUI |
createUI(JComponent x)
|
Dimension |
getMaximumSize(JComponent c)
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 menu)
|
protected void |
uninstallDefaults()
|
protected void |
uninstallKeyboardActions()
|
protected void |
uninstallListeners()
|
Methods inherited from class javax.swing.plaf.basic.BasicMenuItemUI |
---|
createMenuKeyListener, doClick, getMinimumSize, getPath, getPreferredMenuItemSize, getPreferredSize, installComponents, installUI, paint, paintBackground, paintMenuItem, paintText, uninstallComponents, uninstallUI, update |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ChangeListener changeListener
protected MenuListener menuListener
Constructor Detail |
---|
public BasicMenuUI()
Method Detail |
---|
public static ComponentUI createUI(JComponent x)
protected void installDefaults()
installDefaults
in class BasicMenuItemUI
protected String getPropertyPrefix()
getPropertyPrefix
in class BasicMenuItemUI
protected void installListeners()
installListeners
in class BasicMenuItemUI
protected void installKeyboardActions()
installKeyboardActions
in class BasicMenuItemUI
protected void uninstallKeyboardActions()
uninstallKeyboardActions
in class BasicMenuItemUI
protected MouseInputListener createMouseInputListener(JComponent c)
createMouseInputListener
in class BasicMenuItemUI
protected MenuListener createMenuListener(JComponent c)
protected ChangeListener createChangeListener(JComponent c)
protected PropertyChangeListener createPropertyChangeListener(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 nullprotected void uninstallDefaults()
uninstallDefaults
in class BasicMenuItemUI
protected void uninstallListeners()
uninstallListeners
in class BasicMenuItemUI
protected MenuDragMouseListener createMenuDragMouseListener(JComponent c)
createMenuDragMouseListener
in class BasicMenuItemUI
public Dimension getMaximumSize(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 componentsDimension
object or null
JComponent.getMaximumSize()
,
LayoutManager2.maximumLayoutSize(java.awt.Container)
protected void setupPostTimer(JMenu menu)
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1993, 2010, Oracle Corporation. All rights reserved.