src/java.desktop/share/classes/javax/swing/JRadioButton.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 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 --- 1,7 ---- /* ! * Copyright (c) 1997, 2015, 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
*** 22,43 **** * 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 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 --- 22,40 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ package javax.swing; ! import java.beans.JavaBean; ! import java.beans.BeanProperty; import javax.swing.plaf.*; import javax.accessibility.*; import java.io.ObjectOutputStream; 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,94 **** * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; * 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 */ @SuppressWarnings("serial") // Same-version serialization only public class JRadioButton extends JToggleButton implements Accessible { /** * @see #getUIClassID --- 73,89 ---- * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. * * @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,215 **** * 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&amp;F class. */ public String getUIClassID() { return uiClassID; } --- 197,209 ---- * that renders this component. * * @return String "RadioButtonUI" * @see JComponent#getUIClassID * @see UIDefaults#getUI */ + @BeanProperty(bound = false, expert = true, description + = "A string that specifies the name of the L&amp;F class.") public String getUIClassID() { return uiClassID; }
*** 261,274 **** * 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 */ public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJRadioButton(); } return accessibleContext; --- 255,267 ---- * AccessibleJRadioButton. * A new AccessibleJRadioButton instance is created if necessary. * * @return an AccessibleJRadioButton that serves as the * AccessibleContext of this JRadioButton */ + @BeanProperty(bound = false, expert = true, description + = "The AccessibleContext associated with this Button") public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJRadioButton(); } return accessibleContext;