本文整理匯總了Java中javafx.scene.control.RadioButton.isSelected方法的典型用法代碼示例。如果您正苦於以下問題:Java RadioButton.isSelected方法的具體用法?Java RadioButton.isSelected怎麽用?Java RadioButton.isSelected使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javafx.scene.control.RadioButton
的用法示例。
在下文中一共展示了RadioButton.isSelected方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: selectRadioBottonSelectedSelected
import javafx.scene.control.RadioButton; //導入方法依賴的package包/類
@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();
}
};
}
示例2: selectRadiobuttonSelectedNotSelected
import javafx.scene.control.RadioButton; //導入方法依賴的package包/類
@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();
}
};
}
示例3: selectRadiobuttonNotSelectedSelected
import javafx.scene.control.RadioButton; //導入方法依賴的package包/類
@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();
}
};
}
示例4: selectRadiobuttoNotSelectedNotSelected
import javafx.scene.control.RadioButton; //導入方法依賴的package包/類
@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();
}
};
}
示例5: startOrder
import javafx.scene.control.RadioButton; //導入方法依賴的package包/類
private void startOrder(Object source, Flow flow, ViewContext context, TableKey key) {
TextArea commentField = new TextArea();
ComboBox<Integer> prioField = QueryUtils.priorityCombo();
BasicEntityEditor<LOSStorageLocation> destinationField = new BasicEntityEditor<>();
BasicEntityEditor<User> userField = new BasicEntityEditor<>();
CheckBox releaseOrder = new CheckBox("Release picking order");
RadioButton useStrategy = new RadioButton("Use picking strategy");
RadioButton createOnePerCustomer = new RadioButton("Create on pick per customer");
RadioButton createOne = new RadioButton("Create only one picking order");
ToggleGroup tg = new ToggleGroup();
createOnePerCustomer.setToggleGroup(tg);
createOne.setToggleGroup(tg);
useStrategy.setToggleGroup(tg);
releaseOrder.setSelected(true);
useStrategy.setSelected(true);
userField.configure(context, User.class);
destinationField.configure(context, LOSStorageLocation.class);
boolean ok = MDialogs.create(context.getRootNode(), "Automatic order treatment")
.input("Priority", prioField)
.input("Destination", destinationField)
.input("User", userField)
.input("", releaseOrder)
.input("", useStrategy)
.input("", createOnePerCustomer)
.input("", createOne)
.input(new TitledPane("Comment", commentField))
.showOkCancel();
if (!ok) return; // user canceled
boolean useSingleOrderService = createOne.isSelected();
boolean useStratOrderService = useStrategy.isSelected();
int prio = prioField.getValue();
String destinationName = Closures.guardedValue(
destinationField.getValue(), LOSStorageLocation::getName, null);
boolean setProcessable = releaseOrder.isSelected();
String userName = Closures.guardedValue(userField.getValue(), User::getName, null);
LOSPickingFacade facade = context.getBean(LOSPickingFacade.class);
String comment = commentField.getText();
long id = key.get("id");
context.getExecutor().run(() -> {
facade.createOrders(id, true, useSingleOrderService, useStratOrderService, prio, destinationName, setProcessable, userName, comment);
})
.thenAcceptAsync(x -> flow.executeCommand(Flow.REFRESH_ACTION), Platform::runLater);
}
示例6: isSelected
import javafx.scene.control.RadioButton; //導入方法依賴的package包/類
/**
*
* @param <T>
* @param radioButton
* @return
*/
private static <T> boolean isSelected(RadioButton radioButton) {
return true == radioButton.isSelected();
}