类javafx.scene.control.skin.TextFieldSkin源码实例Demo

下面列出了怎么用javafx.scene.control.skin.TextFieldSkin的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: bisq   文件: JFXTextFieldSkinBisqStyle.java
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());
}
 
 类所在包
 类方法
 同包方法