src/share/classes/java/awt/MenuItem.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 262,271 ****
--- 262,274 ----
}
}
/**
* Checks whether this menu item is enabled.
+ *
+ * @return {@code true} if the item is enabled;
+ * otherwise {@code false}
* @see java.awt.MenuItem#setEnabled
* @since JDK1.0
*/
public boolean isEnabled() {
return enabled;
*** 294,303 ****
--- 297,310 ----
peer.setEnabled(true);
}
}
/**
+ * Sets whether or not this menu item can be chosen.
+ *
+ * @param b if {@code true}, enables this menu item;
+ * otherwise {@code false}
* @deprecated As of JDK version 1.1,
* replaced by <code>setEnabled(boolean)</code>.
*/
@Deprecated
public void enable(boolean b) {
*** 492,501 ****
--- 499,510 ----
}
/**
* Gets the command name of the action event that is fired
* by this menu item.
+ *
+ * @return the action command name
* @see java.awt.MenuItem#setActionCommand
* @since JDK1.1
*/
public String getActionCommand() {
return getActionCommandImpl();