当前位置: 首页>>代码示例>>Java>>正文


Java RadioButton.isSelected方法代码示例

本文整理汇总了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();
        }
    };
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:12,代码来源:JavaFXToggleButtonElementTest.java

示例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();
        }
    };
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:13,代码来源:JavaFXToggleButtonElementTest.java

示例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();
        }
    };
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:11,代码来源:JavaFXToggleButtonElementTest.java

示例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();
        }
    };
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:11,代码来源:JavaFXToggleButtonElementTest.java

示例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);
}
 
开发者ID:salimvanak,项目名称:myWMS,代码行数:50,代码来源:OrdersPlugin.java

示例6: isSelected

import javafx.scene.control.RadioButton; //导入方法依赖的package包/类
/**
 * 
 * @param <T>
 * @param radioButton
 * @return 
 */
private static <T> boolean isSelected(RadioButton radioButton) {
    return true == radioButton.isSelected();
}
 
开发者ID:exalt-tech,项目名称:trex-stateless-gui,代码行数:10,代码来源:RadioButtonMatchers.java


注:本文中的javafx.scene.control.RadioButton.isSelected方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。