< prev index next >
src/java.desktop/share/classes/java/awt/CheckboxGroup.java
Print this page
*** 23,36 ****
* questions.
*/
package java.awt;
/**
! * The <code>CheckboxGroup</code> class is used to group together
! * a set of <code>Checkbox</code> buttons.
* <p>
! * Exactly one check box button in a <code>CheckboxGroup</code> can
* be in the "on" state at any given time. Pushing any
* button sets its state to "on" and forces any other button that
* is in the "on" state into the "off" state.
* <p>
* The following code example produces a new check box group,
--- 23,36 ----
* questions.
*/
package java.awt;
/**
! * The {@code CheckboxGroup} class is used to group together
! * a set of {@code Checkbox} buttons.
* <p>
! * Exactly one check box button in a {@code CheckboxGroup} can
* be in the "on" state at any given time. Pushing any
* button sets its state to "on" and forces any other button that
* is in the "on" state into the "off" state.
* <p>
* The following code example produces a new check box group,
*** 67,89 ****
* JDK 1.1 serialVersionUID
*/
private static final long serialVersionUID = 3729780091441768983L;
/**
! * Creates a new instance of <code>CheckboxGroup</code>.
*/
public CheckboxGroup() {
}
/**
* Gets the current choice from this check box group.
* The current choice is the check box in this
* group that is currently in the "on" state,
! * or <code>null</code> if all check boxes in the
* group are off.
* @return the check box that is currently in the
! * "on" state, or <code>null</code>.
* @see java.awt.Checkbox
* @see java.awt.CheckboxGroup#setSelectedCheckbox
* @since 1.1
*/
public Checkbox getSelectedCheckbox() {
--- 67,89 ----
* JDK 1.1 serialVersionUID
*/
private static final long serialVersionUID = 3729780091441768983L;
/**
! * Creates a new instance of {@code CheckboxGroup}.
*/
public CheckboxGroup() {
}
/**
* Gets the current choice from this check box group.
* The current choice is the check box in this
* group that is currently in the "on" state,
! * or {@code null} if all check boxes in the
* group are off.
* @return the check box that is currently in the
! * "on" state, or {@code null}.
* @see java.awt.Checkbox
* @see java.awt.CheckboxGroup#setSelectedCheckbox
* @since 1.1
*/
public Checkbox getSelectedCheckbox() {
*** 94,104 ****
* Returns the current choice from this check box group
* or {@code null} if none of checkboxes are selected.
*
* @return the selected checkbox
* @deprecated As of JDK version 1.1,
! * replaced by <code>getSelectedCheckbox()</code>.
*/
@Deprecated
public Checkbox getCurrent() {
return selectedCheckbox;
}
--- 94,104 ----
* Returns the current choice from this check box group
* or {@code null} if none of checkboxes are selected.
*
* @return the selected checkbox
* @deprecated As of JDK version 1.1,
! * replaced by {@code getSelectedCheckbox()}.
*/
@Deprecated
public Checkbox getCurrent() {
return selectedCheckbox;
}
*** 107,121 ****
* Sets the currently selected check box in this group
* to be the specified check box.
* This method sets the state of that check box to "on" and
* sets all other check boxes in the group to be off.
* <p>
! * If the check box argument is <tt>null</tt>, all check boxes
* in this check box group are deselected. If the check box argument
* belongs to a different check box group, this method does
* nothing.
! * @param box the <code>Checkbox</code> to set as the
* current selection.
* @see java.awt.Checkbox
* @see java.awt.CheckboxGroup#getSelectedCheckbox
* @since 1.1
*/
--- 107,121 ----
* Sets the currently selected check box in this group
* to be the specified check box.
* This method sets the state of that check box to "on" and
* sets all other check boxes in the group to be off.
* <p>
! * If the check box argument is {@code null}, all check boxes
* in this check box group are deselected. If the check box argument
* belongs to a different check box group, this method does
* nothing.
! * @param box the {@code Checkbox} to set as the
* current selection.
* @see java.awt.Checkbox
* @see java.awt.CheckboxGroup#getSelectedCheckbox
* @since 1.1
*/
*** 128,138 ****
* to be the specified check box and unsets all others.
*
* @param box the {@code Checkbox} to set as the
* current selection.
* @deprecated As of JDK version 1.1,
! * replaced by <code>setSelectedCheckbox(Checkbox)</code>.
*/
@Deprecated
public synchronized void setCurrent(Checkbox box) {
if (box != null && box.group != this) {
return;
--- 128,138 ----
* to be the specified check box and unsets all others.
*
* @param box the {@code Checkbox} to set as the
* current selection.
* @deprecated As of JDK version 1.1,
! * replaced by {@code setSelectedCheckbox(Checkbox)}.
*/
@Deprecated
public synchronized void setCurrent(Checkbox box) {
if (box != null && box.group != this) {
return;
< prev index next >