1 |
/* JMenuItem.java -- |
/* JMenuItem.java -- |
2 |
Copyright (C) 2002, 2004 Free Software Foundation, Inc. |
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
60 |
import javax.swing.event.MenuKeyListener; |
import javax.swing.event.MenuKeyListener; |
61 |
import javax.swing.plaf.MenuItemUI; |
import javax.swing.plaf.MenuItemUI; |
62 |
|
|
|
|
|
63 |
/** |
/** |
|
* <p> |
|
64 |
* JMenuItem represents element in the menu. It inherits most of |
* JMenuItem represents element in the menu. It inherits most of |
65 |
* its functionality from AbstractButton, however its behavior somewhat |
* its functionality from AbstractButton, however its behavior somewhat |
66 |
* varies from it. JMenuItem fire different kinds of events. |
* varies from it. JMenuItem fire different kinds of events. |
69 |
* fired when menu item is selected. In addition to this events menuItem also |
* fired when menu item is selected. In addition to this events menuItem also |
70 |
* fire MenuDragMouseEvent and MenuKeyEvents when mouse is dragged over |
* fire MenuDragMouseEvent and MenuKeyEvents when mouse is dragged over |
71 |
* the menu item or associated key with menu item is invoked respectively. |
* the menu item or associated key with menu item is invoked respectively. |
|
* </p> |
|
72 |
*/ |
*/ |
73 |
public class JMenuItem extends AbstractButton implements Accessible, |
public class JMenuItem extends AbstractButton implements Accessible, |
74 |
MenuElement |
MenuElement |
75 |
{ |
{ |
76 |
private static final long serialVersionUID = -1681004643499461044L; |
private static final long serialVersionUID = -1681004643499461044L; |
77 |
|
|
|
/** name for the UI delegate for this menuItem. */ |
|
|
private static final String uiClassID = "MenuItemUI"; |
|
|
|
|
78 |
/** Combination of keyboard keys that can be used to activate this menu item */ |
/** Combination of keyboard keys that can be used to activate this menu item */ |
79 |
private KeyStroke accelerator; |
private KeyStroke accelerator; |
80 |
|
|
206 |
*/ |
*/ |
207 |
public String getUIClassID() |
public String getUIClassID() |
208 |
{ |
{ |
209 |
return uiClassID; |
return "MenuItemUI"; |
210 |
} |
} |
211 |
|
|
212 |
/** |
/** |
638 |
*/ |
*/ |
639 |
protected String paramString() |
protected String paramString() |
640 |
{ |
{ |
641 |
return "JMenuItem"; |
return super.paramString(); |
642 |
} |
} |
643 |
|
|
644 |
public AccessibleContext getAccessibleContext() |
public AccessibleContext getAccessibleContext() |