|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--javax.swing.MenuSelectionManager
Safe:
| Field Summary | |
protected ChangeEvent |
changeEvent
Only one ChangeEvent is needed per button model instance since the event's only state is the source property. |
private static boolean |
DEBUG
|
private static MenuSelectionManager |
instance
|
protected EventListenerList |
listenerList
|
private Vector |
selection
|
private static boolean |
TRACE
|
private static boolean |
VERBOSE
|
| Constructor Summary | |
MenuSelectionManager()
Enabled: |
|
| Method Summary | |
void |
addChangeListener(ChangeListener l)
Enabled: Adds a ChangeListener to the button. |
void |
clearSelectedPath()
Enabled: Tell the menu selection to close and unselect all the menu components. |
Component |
componentForPoint(Component source,
Point sourcePoint)
Enabled: Returns the component in the currently selected path which contains sourcePoint. |
static MenuSelectionManager |
defaultManager()
Suppressed: Returns the default menu selection manager. |
protected void |
fireStateChanged()
Notifies all listeners that have registered interest for notification on this event type. |
ChangeListener[] |
getChangeListeners()
Suppressed: Returns an array of all the ChangeListeners added
to this MenuSelectionManager with addChangeListener(). |
MenuElement[] |
getSelectedPath()
Enabled: Returns the path to the currently selected menu item |
boolean |
isComponentPartOfCurrentMenu(Component c)
Enabled: Return true if c is part of the currently used menu |
private boolean |
isComponentPartOfCurrentMenu(MenuElement root,
Component c)
|
private void |
printMenuElementArray(MenuElement[] path)
|
private void |
printMenuElementArray(MenuElement[] path,
boolean dumpStack)
|
void |
processKeyEvent(KeyEvent e)
Suppressed: When a MenuElement receives an event from a KeyListener, it should never process the event directly. |
void |
processMouseEvent(MouseEvent event)
Suppressed: When a MenuElement receives an event from a MouseListener, it should never process the event directly. |
void |
removeChangeListener(ChangeListener l)
Enabled: Removes a ChangeListener from the button. |
void |
setSelectedPath(MenuElement[] path)
Enabled: 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 |
private static final MenuSelectionManager instance
private Vector selection
private static final boolean TRACE
private static final boolean VERBOSE
private static final boolean DEBUG
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 removepublic ChangeListener[] getChangeListeners()
ChangeListeners added
to this MenuSelectionManager with addChangeListener().
ChangeListeners added or an empty
array if no listeners have been addedprotected void fireStateChanged()
EventListenerListpublic void processMouseEvent(MouseEvent event)
event - a MouseEvent objectprivate void printMenuElementArray(MenuElement[] path)
private void printMenuElementArray(MenuElement[] path,
boolean dumpStack)
public Component componentForPoint(Component source,
Point sourcePoint)
source - The component in whose coordinate space sourcePoint
is givensourcePoint - The point which is being tested
public void processKeyEvent(KeyEvent e)
e - a KeyEvent objectpublic boolean isComponentPartOfCurrentMenu(Component c)
private boolean isComponentPartOfCurrentMenu(MenuElement root,
Component c)
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||