當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。