jdk/src/share/classes/javax/swing/JRadioButton.java
Print this page
@@ -22,22 +22,19 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.swing;
-import java.awt.*;
-import java.awt.event.*;
-import java.beans.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
import javax.swing.plaf.*;
import javax.accessibility.*;
import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
import java.io.IOException;
-
/**
* An implementation of a radio button -- an item that can be selected or
* deselected, and which displays its state to the user.
* Used with a {@link ButtonGroup} object to create a group of buttons
* in which only one button at a time can be selected. (Create a ButtonGroup
@@ -76,19 +73,17 @@
* 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 component which can display it's state as selected or deselected.
- *
* @see ButtonGroup
* @see JCheckBox
* @author Jeff Dinkins
* @since 1.2
*/
+@JavaBean(description = "A component which can display it's state as selected or deselected.")
+@SwingContainer(false)
@SuppressWarnings("serial") // Same-version serialization only
public class JRadioButton extends JToggleButton implements Accessible {
/**
* @see #getUIClassID
@@ -202,14 +197,13 @@
* that renders this component.
*
* @return String "RadioButtonUI"
* @see JComponent#getUIClassID
* @see UIDefaults#getUI
- * @beaninfo
- * expert: true
- * description: A string that specifies the name of the L&F class.
*/
+ @BeanProperty(bound = false, expert = true, description
+ = "A string that specifies the name of the L&F class.")
public String getUIClassID() {
return uiClassID;
}
@@ -261,14 +255,13 @@
* AccessibleJRadioButton.
* A new AccessibleJRadioButton instance is created if necessary.
*
* @return an AccessibleJRadioButton that serves as the
* AccessibleContext of this JRadioButton
- * @beaninfo
- * expert: true
- * description: The AccessibleContext associated with this Button
*/
+ @BeanProperty(bound = false, expert = true, description
+ = "The AccessibleContext associated with this Button")
public AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
accessibleContext = new AccessibleJRadioButton();
}
return accessibleContext;