|
JavaTM Platform Standard Ed. 6 |
|||||||||
��һ���� ��һ���� | ��� ��� ������ | |||||||||
ժҪ�� Ƕ�� | �ֶ� | ���췽�� | ���� | ��ϸ��Ϣ�� �ֶ� | ���췽�� | ���� |
java.lang.Object javax.swing.MenuSelectionManager
public class MenuSelectionManager
MenuSelectionManager ӵ�в˵���νṹ�е�ѡ�
�ֶ�ժҪ | |
---|---|
protected ChangeEvent |
changeEvent
ÿ����ťģ��ʵ��ֻ��Ҫһ�� ChangeEvent����Ϊ�¼���Ωһ״̬�� source ���ԡ� |
protected EventListenerList |
listenerList
|
���췽��ժҪ | |
---|---|
MenuSelectionManager()
|
����ժҪ | |
---|---|
void |
addChangeListener(ChangeListener l)
��ť���� ChangeListener�� |
void |
clearSelectedPath()
��֪�˵�ѡ��Թرպ�ȡ��ѡ�����в˵������ |
Component |
componentForPoint(Component source,
Point sourcePoint)
���ذ��� sourcePoint �ĵ�ǰѡ��·��������� |
static MenuSelectionManager |
defaultManager()
����Ĭ�ϲ˵�ѡ��������� |
protected void |
fireStateChanged()
֪ͨ���жԴ��¼����͵�֪ͨ����Ȥ����ע���������� |
ChangeListener[] |
getChangeListeners()
����ʹ�� addChangeListener() ���ӵ��� MenuSelectionManager ������ ChangeListener �����顣 |
MenuElement[] |
getSelectedPath()
���ص�ǰѡ��˵����·�� |
boolean |
isComponentPartOfCurrentMenu(Component c)
��� c �ǵ�ǰʹ�ò˵���һ���֣��� true |
void |
processKeyEvent(KeyEvent e)
�� MenuElement �� KeyListener �����¼�ʱ��������Ӧֱ�Ӵ������¼��� |
void |
processMouseEvent(MouseEvent event)
�� MenuElement �� MouseListener �����¼�ʱ��������Ӧֱ�Ӵ������¼��� |
void |
removeChangeListener(ChangeListener l)
�Ӱ�ť���Ƴ� ChangeListener�� |
void |
setSelectedPath(MenuElement[] path)
���IJ˵���νṹ�е�ѡ� |
���� java.lang.Object �̳еķ��� |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
�ֶ���ϸ��Ϣ |
---|
protected transient ChangeEvent changeEvent
protected EventListenerList listenerList
���췽����ϸ��Ϣ |
---|
public MenuSelectionManager()
������ϸ��Ϣ |
---|
public static MenuSelectionManager defaultManager()
public void setSelectedPath(MenuElement[] path)
ע�⣬�˷���Ϊ���������������������ʹ�ã���Ӧ�ɿͻ���Ӧ�ó�����á�
path
- ָ��ѡ��·���� MenuElement
���������public MenuElement[] getSelectedPath()
public void clearSelectedPath()
public void addChangeListener(ChangeListener l)
l
- Ҫ���ӵ�������public void removeChangeListener(ChangeListener l)
l
- Ҫ�Ƴ���������public ChangeListener[] getChangeListeners()
ChangeListener
�����顣
ChangeListener
�����û���������������ؿ�����protected void fireStateChanged()
EventListenerList
public void processMouseEvent(MouseEvent event)
event
- MouseEvent ����public Component componentForPoint(Component source, Point sourcePoint)
source
- �Ѹ�������ռ� sourcePoint �����sourcePoint
- ���ڱ����Եĵ�
public void processKeyEvent(KeyEvent e)
e
- KeyEvent ����public boolean isComponentPartOfCurrentMenu(Component c)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
��һ���� ��һ���� | ��� ��� ������ | |||||||||
ժҪ�� Ƕ�� | �ֶ� | ���췽�� | ���� | ��ϸ��Ϣ�� �ֶ� | ���췽�� | ���� |
��Ȩ���� 2007 Sun Microsystems, Inc. ��������Ȩ���� ����������֤��������������ĵ����·ַ�������