summaryrefslogtreecommitdiff
path: root/javax/swing/JMenuItem.java
diff options
context:
space:
mode:
Diffstat (limited to 'javax/swing/JMenuItem.java')
-rw-r--r--javax/swing/JMenuItem.java34
1 files changed, 29 insertions, 5 deletions
diff --git a/javax/swing/JMenuItem.java b/javax/swing/JMenuItem.java
index 643fe8fd5..272c1cfe6 100644
--- a/javax/swing/JMenuItem.java
+++ b/javax/swing/JMenuItem.java
@@ -1,5 +1,5 @@
/* JMenuItem.java --
- Copyright (C) 2002, 2004, 2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,6 +38,8 @@ exception statement from your version. */
package javax.swing;
+import gnu.classpath.NotImplementedException;
+
import java.awt.Component;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
@@ -671,16 +673,26 @@ public class JMenuItem extends AbstractButton implements Accessible,
}
/**
- * A string that describes this JMenuItem. Normally only used
- * for debugging.
+ * Returns a string describing the attributes for the <code>JToolTip</code>
+ * component, for use in debugging. The return value is guaranteed to be
+ * non-<code>null</code>, but the format of the string may vary between
+ * implementations.
*
- * @return A string describing this JMenuItem
+ * @return A string describing the attributes of the <code>JMenuItem</code>.
*/
protected String paramString()
{
+ // calling super seems to be sufficient here...
return super.paramString();
}
+ /**
+ * Returns the object that provides accessibility features for this
+ * <code>JMenuItem</code> component.
+ *
+ * @return The accessible context (an instance of
+ * {@link AccessibleJMenuItem}).
+ */
public AccessibleContext getAccessibleContext()
{
if (accessibleContext == null)
@@ -689,13 +701,19 @@ public class JMenuItem extends AbstractButton implements Accessible,
return accessibleContext;
}
+ /**
+ * Provides the accessibility features for the <code>JMenuItem</code>
+ * component.
+ *
+ * @see JMenuItem#getAccessibleContext()
+ */
protected class AccessibleJMenuItem extends AccessibleAbstractButton
implements ChangeListener
{
private static final long serialVersionUID = 6748924232082076534L;
/**
- * Creates a new AccessibleJMenuItem object.
+ * Creates a new <code>AccessibleJMenuItem</code> instance.
*/
AccessibleJMenuItem()
{
@@ -703,10 +721,16 @@ public class JMenuItem extends AbstractButton implements Accessible,
}
public void stateChanged(ChangeEvent event)
+ throws NotImplementedException
{
// TODO: What should be done here, if anything?
}
+ /**
+ * Returns the accessible role for the <code>JMenuItem</code> component.
+ *
+ * @return {@link AccessibleRole#MENU_ITEM}.
+ */
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.MENU_ITEM;