jdk/src/share/classes/javax/swing/JToggleButton.java
Print this page
@@ -24,20 +24,19 @@
*/
package javax.swing;
import java.awt.*;
import java.awt.event.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
-import javax.swing.event.*;
import javax.swing.plaf.*;
import javax.accessibility.*;
import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
import java.io.IOException;
-
/**
* An implementation of a two-state button.
* The <code>JRadioButton</code> and <code>JCheckBox</code> classes
* are subclasses of this class.
* For information on using them see
@@ -66,19 +65,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: An implementation of a two-state button.
- *
* @see JRadioButton
* @see JCheckBox
* @author Jeff Dinkins
* @since 1.2
*/
+@JavaBean(defaultProperty = "UIClassID", description = "An implementation of a two-state button.")
+@SwingContainer(false)
@SuppressWarnings("serial") // Same-version serialization only
public class JToggleButton extends AbstractButton implements Accessible {
/**
* @see #getUIClassID
@@ -193,13 +190,13 @@
* that renders this component.
*
* @return String "ToggleButtonUI"
* @see JComponent#getUIClassID
* @see UIDefaults#getUI
- * @beaninfo
- * description: A string that specifies the name of the L&F class
*/
+ @BeanProperty(bound = false, description
+ = "A string that specifies the name of the L&F class")
public String getUIClassID() {
return uiClassID;
}
@@ -360,14 +357,13 @@
* AccessibleJToggleButton.
* A new AccessibleJToggleButton instance is created if necessary.
*
* @return an AccessibleJToggleButton that serves as the
* AccessibleContext of this JToggleButton
- * @beaninfo
- * expert: true
- * description: The AccessibleContext associated with this ToggleButton.
*/
+ @BeanProperty(bound = false, expert = true, description
+ = "The AccessibleContext associated with this ToggleButton.")
public AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
accessibleContext = new AccessibleJToggleButton();
}
return accessibleContext;