當前位置: 首頁>>代碼示例>>Java>>正文


Java TextField.textProperty方法代碼示例

本文整理匯總了Java中javafx.scene.control.TextField.textProperty方法的典型用法代碼示例。如果您正苦於以下問題:Java TextField.textProperty方法的具體用法?Java TextField.textProperty怎麽用?Java TextField.textProperty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.control.TextField的用法示例。


在下文中一共展示了TextField.textProperty方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: maximumChunkSizeSelection

import javafx.scene.control.TextField; //導入方法依賴的package包/類
private Node maximumChunkSizeSelection( ProgrammerSettingDetails settingDetails )
{
	HBox hBox = new HBox();

	//TODO ensure numerical values only
	Text maxChunkSizeLabel = new Text("Maximum chunk size: ");
	maxChunkSizeLabel.setId(UIConstants.TEXT_COLOR);

	TextField maxChunkSizeTextField = new TextField();
	maxChunkSizeTextField.setText(settingDetails.getMaximumChunkSize());

	maxChunkSizeTextField.textProperty().addListener(( observable, oldValue, newValue ) -> {
		if ( !newValue.isEmpty() )
			UIStyle.applyError(VerifyUtil.simpleIntegerCheck(newValue), maxChunkSizeTextField);
	});

	maximumChunkSizeSelectionModel = maxChunkSizeTextField.textProperty();

	hBox.getChildren().addAll(maxChunkSizeLabel, maxChunkSizeTextField);

	return hBox;
}
 
開發者ID:dhawal9035,項目名稱:WebPLP,代碼行數:23,代碼來源:ProgrammerSettingsPanel.java

示例2: timeoutSelection

import javafx.scene.control.TextField; //導入方法依賴的package包/類
private Node timeoutSelection( ProgrammerSettingDetails settingDetails )
{
	HBox hBox = new HBox();

	Text receiveTimeoutLabel = new Text("Receive timout (ms): ");
	receiveTimeoutLabel.setId(UIConstants.TEXT_COLOR);

	TextField receiveTimeoutTextField = new TextField();
	receiveTimeoutTextField.setText(settingDetails.getReceiveTimeoutMilliseconds());

	receiveTimeoutTextField.textProperty().addListener(( observable, oldValue, newValue ) -> {
		if ( !newValue.isEmpty() )
			UIStyle.applyError(VerifyUtil.simpleIntegerCheck(newValue), receiveTimeoutTextField);
	});

	receiveTimeoutSelectionModel = receiveTimeoutTextField.textProperty();

	hBox.getChildren().addAll(receiveTimeoutLabel, receiveTimeoutTextField);

	return hBox;
}
 
開發者ID:dhawal9035,項目名稱:WebPLP,代碼行數:22,代碼來源:ProgrammerSettingsPanel.java

示例3: forceNumericalInput

import javafx.scene.control.TextField; //導入方法依賴的package包/類
public static void forceNumericalInput(TextField numericalTextField) {
	StringProperty pinTextProperty = numericalTextField.textProperty();
	pinTextProperty.addListener((observableString, oldValue, newValue) -> {
		if (!newValue.matches("\\d*")) {
			numericalTextField.setText(newValue.replaceAll("[^\\d]", ""));
		}
	});
}
 
開發者ID:kana0011,項目名稱:symmetrical-memory,代碼行數:9,代碼來源:UiCommons.java


注:本文中的javafx.scene.control.TextField.textProperty方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。