本文整理汇总了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();
}