modules/controls/src/main/java/javafx/scene/control/RadioButton.java

Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization


  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.scene.control;
  27 
  28 import javafx.geometry.Pos;
  29 
  30 import com.sun.javafx.scene.control.skin.RadioButtonSkin;
  31 
  32 import javafx.beans.value.WritableValue;
  33 import javafx.css.StyleableProperty;
  34 import javafx.scene.AccessibleAttribute;
  35 import javafx.scene.AccessibleRole;
  36 
  37 /**
  38  * <p>RadioButtons create a series of items where only one item can be
  39  * selected.  RadioButtons are a specialized {@link ToggleButton}.
  40  * When a RadioButton is pressed and released a {@link javafx.event.ActionEvent}
  41  * is sent. Your application can perform some action based
  42  * on this event by implementing an {@link javafx.event.EventHandler} to
  43  * process the {@link javafx.event.ActionEvent}.</p>
  44  * 
  45  * <p>
  46  * Only one RadioButton can be selected when placed in a {@link ToggleGroup}.
  47  * Clicking on a selected RadioButton will have no effect.  A RadioButton that is not
  48  * in a ToggleGroup can be selected and unselected.  By default a RadioButton is
  49  * not in a ToggleGroup.  Calling {@code ToggleGroup.getSelectedToggle()}
  50  * will return you the RadioButton that has been selected.




  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.scene.control;
  27 
  28 import javafx.geometry.Pos;
  29 
  30 import javafx.scene.control.skin.RadioButtonSkin;
  31 
  32 import javafx.beans.value.WritableValue;
  33 import javafx.css.StyleableProperty;
  34 import javafx.scene.AccessibleAttribute;
  35 import javafx.scene.AccessibleRole;
  36 
  37 /**
  38  * <p>RadioButtons create a series of items where only one item can be
  39  * selected.  RadioButtons are a specialized {@link ToggleButton}.
  40  * When a RadioButton is pressed and released a {@link javafx.event.ActionEvent}
  41  * is sent. Your application can perform some action based
  42  * on this event by implementing an {@link javafx.event.EventHandler} to
  43  * process the {@link javafx.event.ActionEvent}.</p>
  44  * 
  45  * <p>
  46  * Only one RadioButton can be selected when placed in a {@link ToggleGroup}.
  47  * Clicking on a selected RadioButton will have no effect.  A RadioButton that is not
  48  * in a ToggleGroup can be selected and unselected.  By default a RadioButton is
  49  * not in a ToggleGroup.  Calling {@code ToggleGroup.getSelectedToggle()}
  50  * will return you the RadioButton that has been selected.