javafx.scene.control.skin.TextFieldSkin Java Examples
The following examples show how to use
javafx.scene.control.skin.TextFieldSkin.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JFXTextFieldSkinBisqStyle.java From bisq with GNU Affero General Public License v3.0 | 5 votes |
public JFXTextFieldSkinBisqStyle(T textField, double inputLineExtension) { super(textField); textPane = (Pane) this.getChildren().get(0); this.inputLineExtension = inputLineExtension; // get parent fields textNode = ReflectionHelper.getFieldContent(TextFieldSkin.class, this, "textNode"); textTranslateX = ReflectionHelper.getFieldContent(TextFieldSkin.class, this, "textTranslateX"); textRight = ReflectionHelper.getFieldContent(TextFieldSkin.class, this, "textRight"); linesWrapper = new PromptLinesWrapper<T>( textField, promptTextFillProperty(), textField.textProperty(), textField.promptTextProperty(), () -> promptText); linesWrapper.init(() -> createPromptNode(), textPane); ReflectionHelper.setFieldContent(TextFieldSkin.class, this, "usePromptText", linesWrapper.usePromptText); errorContainer = new ValidationPane<>(textField); getChildren().addAll(linesWrapper.line, linesWrapper.focusedLine, linesWrapper.promptContainer, errorContainer); registerChangeListener(textField.disableProperty(), obs -> linesWrapper.updateDisabled()); registerChangeListener(textField.focusColorProperty(), obs -> linesWrapper.updateFocusColor()); registerChangeListener(textField.unFocusColorProperty(), obs -> linesWrapper.updateUnfocusColor()); registerChangeListener(textField.disableAnimationProperty(), obs -> errorContainer.updateClip()); }