< prev index next >
src/java.desktop/share/classes/javax/swing/JToggleButton.java
Print this page
*** 36,57 ****
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
* <a
href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>,
* a section in <em>The Java Tutorial</em>.
* <p>
* Buttons 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 button has many benefits beyond directly
* configuring a button. 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>
* <strong>Warning:</strong> Swing is not thread safe. For more
--- 36,57 ----
import java.io.IOException;
/**
* An implementation of a two-state button.
! * The {@code JRadioButton} and {@code JCheckBox} classes
* are subclasses of this class.
* For information on using them see
* <a
href="http://docs.oracle.com/javase/tutorial/uiswing/components/button.html">How to Use Buttons, Check Boxes, and Radio Buttons</a>,
* a section in <em>The Java Tutorial</em>.
* <p>
* Buttons can be configured, and to some degree controlled, by
* <code><a href="Action.html">Action</a></code>s. Using an
! * {@code Action} with a button has many benefits beyond directly
* configuring a button. 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>
* <strong>Warning:</strong> Swing is not thread safe. For more
*** 63,73 ****
* 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: An implementation of a two-state button.
--- 63,73 ----
* 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: An implementation of a two-state button.
*** 220,230 ****
* 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
public static class ToggleButtonModel extends DefaultButtonModel {
--- 220,230 ----
* 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
public static class ToggleButtonModel extends DefaultButtonModel {
*** 339,349 ****
/**
* Returns a string representation of this JToggleButton. 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 JToggleButton.
*/
protected String paramString() {
return super.paramString();
--- 339,349 ----
/**
* Returns a string representation of this JToggleButton. 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 JToggleButton.
*/
protected String paramString() {
return super.paramString();
*** 373,393 ****
return accessibleContext;
}
/**
* This class implements accessibility support for the
! * <code>JToggleButton</code> class. It provides an implementation of the
* Java Accessibility API appropriate to toggle button 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 AccessibleJToggleButton extends AccessibleAbstractButton
implements ItemListener {
--- 373,393 ----
return accessibleContext;
}
/**
* This class implements accessibility support for the
! * {@code JToggleButton} class. It provides an implementation of the
* Java Accessibility API appropriate to toggle button 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 AccessibleJToggleButton extends AccessibleAbstractButton
implements ItemListener {
< prev index next >