Java Code Examples for javafx.scene.control.RadioButton#isSelected()
The following examples show how to use
javafx.scene.control.RadioButton#isSelected() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JavaFXToggleButtonElementTest.java From marathonv5 with Apache License 2.0 | 5 votes |
@Test public void selectRadioBottonSelectedSelected() { RadioButton radioButtonNode = (RadioButton) getPrimaryStage().getScene().getRoot().lookup(".radio-button"); radioButtonNode.setSelected(true); AssertJUnit.assertEquals(true, radioButtonNode.isSelected()); radioButton.marathon_select("true"); new Wait("Waiting for the radio button selection.") { @Override public boolean until() { return radioButtonNode.isSelected(); } }; }
Example 2
Source File: JavaFXToggleButtonElementTest.java From marathonv5 with Apache License 2.0 | 5 votes |
@Test public void selectRadiobuttonSelectedNotSelected() { Set<Node> radioButtonNodes = getPrimaryStage().getScene().getRoot().lookupAll(".radio-button"); List<Node> nodes = new ArrayList<>(radioButtonNodes); RadioButton radioButtonNode = (RadioButton) nodes.get(1); AssertJUnit.assertEquals(true, radioButtonNode.isSelected()); radioButton.marathon_select("false"); new Wait("Waiting for the radio button deselect.") { @Override public boolean until() { return radioButtonNode.isSelected(); } }; }
Example 3
Source File: JavaFXToggleButtonElementTest.java From marathonv5 with Apache License 2.0 | 5 votes |
@Test public void selectRadiobuttonNotSelectedSelected() { RadioButton radioButtonNode = (RadioButton) getPrimaryStage().getScene().getRoot().lookup(".radio-button"); AssertJUnit.assertEquals(false, radioButtonNode.isSelected()); radioButton.marathon_select("true"); new Wait("Waiting for the radio button selection.") { @Override public boolean until() { return radioButtonNode.isSelected(); } }; }
Example 4
Source File: JavaFXToggleButtonElementTest.java From marathonv5 with Apache License 2.0 | 5 votes |
@Test public void selectRadiobuttoNotSelectedNotSelected() { RadioButton radioButtonNode = (RadioButton) getPrimaryStage().getScene().getRoot().lookup(".radio-button"); AssertJUnit.assertEquals(false, radioButtonNode.isSelected()); radioButton.marathon_select("false"); new Wait("Waiting for the radio button state.") { @Override public boolean until() { return !radioButtonNode.isSelected(); } }; }
Example 5
Source File: RadioButtonMatchers.java From trex-stateless-gui with Apache License 2.0 | 2 votes |
/** * * @param <T> * @param radioButton * @return */ private static <T> boolean isSelected(RadioButton radioButton) { return true == radioButton.isSelected(); }