java.lang.Object | |
↳ | javax.swing.MenuSelectionManager |
A MenuSelectionManager owns the selection in menu hierarchy.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
changeEvent | Only one ChangeEvent is needed per button model instance since the event's only state is the source property. | ||||||||||
listenerList |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a ChangeListener to the button.
| |||||||||||
Tell the menu selection to close and unselect all the menu components.
| |||||||||||
Returns the component in the currently selected path
which contains sourcePoint.
| |||||||||||
Returns the default menu selection manager.
| |||||||||||
Returns an array of all the
ChangeListener s added
to this MenuSelectionManager with addChangeListener(). | |||||||||||
Returns the path to the currently selected menu item
| |||||||||||
Return true if c is part of the currently used menu
| |||||||||||
When a MenuElement receives an event from a KeyListener, it should never process the event
directly.
| |||||||||||
When a MenuElement receives an event from a MouseListener, it should never process the event
directly.
| |||||||||||
Removes a ChangeListener from the button.
| |||||||||||
Changes the selection in the menu hierarchy.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Notifies all listeners that have registered interest for
notification on this event type.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Only one ChangeEvent is needed per button model instance since the event's only state is the source property. The source of events generated is always "this".
Adds a ChangeListener to the button.
l | the listener to add |
---|
Tell the menu selection to close and unselect all the menu components. Call this method when a choice has been made
Returns the component in the currently selected path which contains sourcePoint.
source | The component in whose coordinate space sourcePoint is given |
---|---|
sourcePoint | The point which is being tested |
Returns the default menu selection manager.
Returns an array of all the ChangeListener
s added
to this MenuSelectionManager with addChangeListener().
ChangeListener
s added or an empty
array if no listeners have been addedReturns the path to the currently selected menu item
Return true if c is part of the currently used menu
When a MenuElement receives an event from a KeyListener, it should never process the event directly. Instead all MenuElements should call this method with the event.
e | a KeyEvent object |
---|
When a MenuElement receives an event from a MouseListener, it should never process the event directly. Instead all MenuElements should call this method with the event.
event | a MouseEvent object |
---|
Removes a ChangeListener from the button.
l | the listener to remove |
---|
Changes the selection in the menu hierarchy. The elements in the array are sorted in order from the root menu element to the currently selected menu element.
Note that this method is public but is used by the look and feel engine and should not be called by client applications.
path | an array of MenuElement objects specifying
the selected path
|
---|
Notifies all listeners that have registered interest for notification on this event type. The event instance is created lazily.