@Override public Node getDisplayNode() { if (displayNode == null) { displayNode = getEditableInputNode(); displayNode.getStyleClass().add("date-picker-display-node"); updateDisplayNode(); } displayNode.setEditable(jfxDatePicker.isEditable()); return displayNode; }
@Override public Node getDisplayNode() { if (displayNode == null) { displayNode = getEditableInputNode(); displayNode.getStyleClass().add("time-picker-display-node"); updateDisplayNode(); } displayNode.setEditable(jfxTimePicker.isEditable()); return displayNode; }
/** * set whether the control is editable * * @param b */ public void setEditable(boolean b) { if (control instanceof TextField) { textField.setEditable(b); } else { control.setDisable(!b); } }
@Nonnull public static TextField textFieldReadonly(@Nonnull ObservableValue<? extends String> text) { TextField textField = new TextField(); textField.textProperty().bind(text); textField.setEditable(false); return textField; }
@Override public Node getDisplayNode() { if (displayNode == null) { displayNode = reflectGetEditableInputNode(); displayNode.getStyleClass().add("date-picker-display-node"); reflectUpdateDisplayNode(); } displayNode.setEditable(jfxDatePicker.isEditable()); return displayNode; }
@Override public Node getDisplayNode() { if (displayNode == null) { displayNode = reflectGetEditableInputNode(); displayNode.getStyleClass().add("time-picker-display-node"); reflectUpdateDisplayNode(); } displayNode.setEditable(jfxTimePicker.isEditable()); return displayNode; }
@Nonnull public static TextField textFieldDoubleReadonly(@Nonnull ReadOnlyDoubleProperty doubleProperty, @Nonnull NumberStringConverterForFloatingPointNumbers floatConverter) { TextField textField = new TextField(); doubleProperty.addListener((observable, oldValue, newValue) -> textField.setText(floatConverter.toString(newValue))); textField.setText(floatConverter.toString(doubleProperty.get())); textField.setEditable(false); return textField; }
@Nonnull public static TextField textFieldIntegerReadonly(@Nonnull ReadOnlyIntegerProperty integerProperty, @Nonnull NumberStringConverterForIntegers integerConverter) { TextField textField = new TextField(); integerProperty.addListener((observable, oldValue, newValue) -> textField.setText(integerConverter.toString(newValue))); textField.setText(integerConverter.toString(integerProperty.get())); textField.setEditable(false); return textField; }
@Nonnull public static TextField textFieldFloatReadonly(@Nonnull ReadOnlyFloatProperty floatProperty, @Nonnull NumberStringConverterForFloatingPointNumbers floatConverter) { TextField textField = new TextField(); floatProperty.addListener((observable, oldValue, newValue) -> textField.setText(floatConverter.toString(newValue))); textField.setText(floatConverter.toString(floatProperty.get())); textField.setEditable(false); return textField; }
@Nonnull public static <E extends Enum<E>> TextField textFieldEnumReadOnly(@Nonnull ObjectProperty<E> enumProperty) { TextField textField = new TextField(); textField.setEditable(false); textField.textProperty().bind(Bindings.createStringBinding(() -> EnumTranslatorUtil.getEnumTranslator().translate(enumProperty.get()), enumProperty)); return textField; }
/** * Tries the given OTP (pin code) against Twitter's API. * * @param requestToken the OAuth request to test the OTP against */ private void registerPinCode(final RequestToken requestToken) { final Optional<AccessToken> success = this.twitterHandler.registerAccessToken( requestToken, this.pinCodeField.getText() ); if (success.isPresent()) { sessionManager.addNewSession(this.twitterHandler); final AccessToken token = success.get(); this.loggedUsernameLabel.setText(token.getScreenName()); validatePinCodeButton.setDisable(true); pinCodeField.setDisable(true); pinCodeField.setEditable(false); uiStep3(); } else { ExceptionHandler.displayExceptionPane( "Authentication Error", "Could not authenticate you!", new Exception("No token could be used.") ); } }
@Override public void handle(MouseEvent mouseEvent) { selectedPoint.set(value); setMinSize(50, 20); final TextField textField = new TextField("" + value.value); textField.setEditable(false); getChildren().add(textField); textField.minWidthProperty().bind(minWidthProperty()); textField.minHeightProperty().bind(minHeightProperty()); } });
zFocus.setPrefWidth(50.0); xFocus.setEditable(false); yFocus.setEditable(false); zFocus.setEditable(false); TextField regionId = new TextField("-1"); regionId.setPrefWidth(100.0); regionId.setEditable(false); Label stdXLabel = new Label("standard dev. x: "); TextField stdx = new TextField("-1"); stdx.setPrefWidth(75.0); stdx.setEditable(false); Label stdYLabel = new Label("y: "); TextField stdy = new TextField("-1"); stdy.setPrefWidth(75.0); stdy.setEditable(false); Label stdZLabel = new Label("z: "); TextField stdz = new TextField("-1"); stdz.setPrefWidth(75.0); stdz.setEditable(false); stdVolume.setEditable(false); Label stdDensityLabel = new Label("density: "); TextField stdDensity = new TextField("-1"); stdDensity.setPrefWidth(75.0); stdDensity.setEditable(false);
HBox hBox = new HBox(); TextField displayTextfiled = new TextField(); displayTextfiled.setEditable(false);
textField.setEditable(false); textField.textProperty().bind(stringBinding); textField.setOnMouseClicked(mouseEvent -> {
@Override public Node createValueVisualisation() { TextField encryptedTextField = new TextField(); encryptedTextField.setEditable(false); observableAttributeValue.addListener(encryptedStringChangeListener); encryptedStringChangeListener.changed(observableAttributeValue, observableAttributeValue.get(), observableAttributeValue.get()); decryptedTextField.setEditable(false);
editor = new AbstractPropertyEditor<Object, TextField>(item, new TextField(), true) { getEditor().setEditable(false); getEditor().setDisable(true);
textField.setEditable(false);
textField.setEditable(false);
TextField tf3 = new TextField("disabled Textfield"); tf3.setDisable(true); tf3.setEditable(false); textfieldBox2.getChildren().add(tf3); TextField tf4 = new TextField(); textfieldBox3.setPadding(new Insets(10)); TextField tf5 = new TextField("non-editable textfield"); tf5.setEditable(false); textfieldBox3.getChildren().add(tf5); PasswordField pw1 = new PasswordField();