< prev index next >
src/java.desktop/share/classes/javax/swing/JCheckBoxMenuItem.java
Print this page
*** 43,65 ****
* item typically appears with a checkmark next to it. If unselected or
* deselected, the menu item appears without a checkmark. Like a regular
* menu item, a check box menu item can have either text or a graphic
* icon associated with it, or both.
* <p>
! * Either <code>isSelected</code>/<code>setSelected</code> or
! * <code>getState</code>/<code>setState</code> can be used
* to determine/specify the menu item's selection state. The
! * preferred methods are <code>isSelected</code> and
! * <code>setSelected</code>, which work for all menus and buttons.
! * The <code>getState</code> and <code>setState</code> methods exist for
* compatibility with other component sets.
* <p>
* Menu items can be configured, and to some degree controlled, by
* <code><a href="Action.html">Action</a></code>s. Using an
! * <code>Action</code> with a menu item has many benefits beyond directly
* configuring a menu item. Refer to <a href="Action.html#buttonActions">
! * Swing Components Supporting <code>Action</code></a> for more
* details, and you can find more information in <a
* href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
* to Use Actions</a>, a section in <em>The Java Tutorial</em>.
* <p>
* For further information and examples of using check box menu items,
--- 43,65 ----
* item typically appears with a checkmark next to it. If unselected or
* deselected, the menu item appears without a checkmark. Like a regular
* menu item, a check box menu item can have either text or a graphic
* icon associated with it, or both.
* <p>
! * Either {@code isSelected}/{@code setSelected} or
! * {@code getState}/{@code setState} can be used
* to determine/specify the menu item's selection state. The
! * preferred methods are {@code isSelected} and
! * {@code setSelected}, which work for all menus and buttons.
! * The {@code getState} and {@code setState} methods exist for
* compatibility with other component sets.
* <p>
* Menu items can be configured, and to some degree controlled, by
* <code><a href="Action.html">Action</a></code>s. Using an
! * {@code Action} with a menu item has many benefits beyond directly
* configuring a menu item. Refer to <a href="Action.html#buttonActions">
! * Swing Components Supporting {@code Action}</a> for more
* details, and you can find more information in <a
* href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
* to Use Actions</a>, a section in <em>The Java Tutorial</em>.
* <p>
* For further information and examples of using check box menu items,
*** 76,86 ****
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
! * has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*
* @beaninfo
* attribute: isContainer false
* description: A menu item which can be selected or deselected.
--- 76,86 ----
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
! * has been added to the {@code java.beans} package.
* Please see {@link java.beans.XMLEncoder}.
*
* @beaninfo
* attribute: isContainer false
* description: A menu item which can be selected or deselected.
*** 243,253 ****
/**
* Returns a string representation of this JCheckBoxMenuItem. This method
* is intended to be used only for debugging purposes, and the
* content and format of the returned string may vary between
* implementations. The returned string may be empty but may not
! * be <code>null</code>.
*
* @return a string representation of this JCheckBoxMenuItem.
*/
protected String paramString() {
return super.paramString();
--- 243,253 ----
/**
* Returns a string representation of this JCheckBoxMenuItem. This method
* is intended to be used only for debugging purposes, and the
* content and format of the returned string may vary between
* implementations. The returned string may be empty but may not
! * be {@code null}.
*
* @return a string representation of this JCheckBoxMenuItem.
*/
protected String paramString() {
return super.paramString();
*** 281,301 ****
return accessibleContext;
}
/**
* This class implements accessibility support for the
! * <code>JCheckBoxMenuItem</code> class. It provides an implementation
* of the Java Accessibility API appropriate to checkbox menu item
* user-interface elements.
* <p>
* <strong>Warning:</strong>
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
! * has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
@SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJCheckBoxMenuItem extends AccessibleJMenuItem {
/**
--- 281,301 ----
return accessibleContext;
}
/**
* This class implements accessibility support for the
! * {@code JCheckBoxMenuItem} class. It provides an implementation
* of the Java Accessibility API appropriate to checkbox menu item
* user-interface elements.
* <p>
* <strong>Warning:</strong>
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
! * has been added to the {@code java.beans} package.
* Please see {@link java.beans.XMLEncoder}.
*/
@SuppressWarnings("serial") // Same-version serialization only
protected class AccessibleJCheckBoxMenuItem extends AccessibleJMenuItem {
/**
< prev index next >