Spec-Zone .ru
спецификации, руководства, описания, API
|
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.MenuSelectionManager
A MenuSelectionManager owns the selection in menu hierarchy.
Field Summary | |
protected ChangeEvent |
changeEvent
Only one ChangeEvent is needed per button model instance since the event's only state is the source property. |
protected EventListenerList |
listenerList
|
Constructor Summary | |
MenuSelectionManager()
|
Method Summary | |
void |
addChangeListener(ChangeListener l)
Adds a ChangeListener to the button. |
void |
clearSelectedPath()
Tell the menu selection to close and unselect all the menu components. |
Component |
componentForPoint(Component source,
Point sourcePoint)
Returns the component in the currently selected path which contains sourcePoint. |
static MenuSelectionManager |
defaultManager()
Returns the default menu selection manager. |
protected void |
fireStateChanged()
|
MenuElement[] |
getSelectedPath()
Returns the path to the currently selected menu item |
boolean |
isComponentPartOfCurrentMenu(Component c)
Return true if c is part of the currently used menu |
void |
processKeyEvent(KeyEvent e)
When a MenuElement receives an event from a KeyListener, it should never process the event directly. |
void |
processMouseEvent(MouseEvent event)
When a MenuElement receives an event from a MouseListener, it should never process the event directly. |
void |
removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button. |
void |
setSelectedPath(MenuElement[] path)
Change the selection in the menu hierarchy. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected transient ChangeEvent changeEvent
protected EventListenerList listenerList
Constructor Detail |
public MenuSelectionManager()
Method Detail |
public static MenuSelectionManager defaultManager()
public void setSelectedPath(MenuElement[] path)
path
- an array of MenuElement objects specifying the selected pathpublic MenuElement[] getSelectedPath()
public void clearSelectedPath()
public void addChangeListener(ChangeListener l)
l
- the listener to addpublic void removeChangeListener(ChangeListener l)
l
- the listener to removeprotected void fireStateChanged()
public void processMouseEvent(MouseEvent event)
event
- a MouseEvent objectpublic Component componentForPoint(Component source, Point sourcePoint)
source
- The component in whose coordinate space sourcePoint
is givensourcePoint
- The point which is being testedpublic void processKeyEvent(KeyEvent e)
e
- a KeyEvent objectpublic boolean isComponentPartOfCurrentMenu(Component c)
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.