@Override protected void layoutChildren(final double x, final double y, final double w, final double h) { super.layoutChildren(x, y, w, h); final double height = getSkinnable().getHeight(); linesWrapper.layoutLines(x, y, w, h, height, Math.floor(h)); errorContainer.layoutPane(x, height + linesWrapper.focusedLine.getHeight(), w, h); if (getSkinnable().getWidth() > 0) { updateTextPos(); } linesWrapper.updateLabelFloatLayout(); if (invalid) { invalid = false; // update validation container errorContainer.invalid(w); // focus linesWrapper.invalid(); } }
@Override protected void layoutChildren(final double x, final double y, final double w, final double h) { super.layoutChildren(x, y, w, h); final double height = getSkinnable().getHeight(); linesWrapper.layoutLines(x, y, w, h, height, Math.floor(h)); errorContainer.layoutPane(x, height + linesWrapper.focusedLine.getHeight(), w, h); if (getSkinnable().getWidth() > 0) { updateTextPos(); } linesWrapper.updateLabelFloatLayout(); if (invalid) { invalid = false; // update validation container errorContainer.invalid(w); // focus linesWrapper.invalid(); } }
@Override public HitInfo getIndex(double x, double y) { /** * This resolves https://bitbucket.org/controlsfx/controlsfx/issue/476 * when we have a left Node and the click point is badly returned * because we weren't considering the shift induced by the leftPane. */ final double leftWidth = leftPane == null ? 0.0 : snapSize(leftPane.prefWidth(getSkinnable().getHeight())); return super.getIndex(x - leftWidth, y); }
private void calculateDimensions(OpenPatricianWoodenTextInput input) { Dimension2D dim = sizing.calculate(input.getSize(), input.getFont()); double inputHeigth = textField.getHeight(); width.set(dim.getWidth()); height.set(Math.max(dim.getHeight(), inputHeigth)); textField.setMaxSize(width.doubleValue(), height.doubleValue()); setImage(); }
@Override protected void layoutChildren(double x, double y, double w, double h) { super.layoutChildren(x, y, w, h); if (searchIconPath != null) { searchIconPath.toFront(); double height = getSkinnable().getHeight(); searchIconPath.setLayoutX(0); searchIconPath.setLayoutY(0); searchIconPath.resize(height, height); } if (cancelSearchIconPath != null) { cancelSearchIconPath.toFront(); double height = getSkinnable().getHeight(); cancelSearchIconPath.setTranslateX(getSkinnable().getWidth() - height * 1.5); cancelSearchIconPath.setLayoutY(height * 0.15); cancelSearchIconPath.resize(height * 0.55, height * 0.55); } }
@Override protected void layoutChildren(final double x, final double y, final double w, final double h) { super.layoutChildren(x, y, w, h); final double height = getSkinnable().getHeight(); linesWrapper.layoutLines(x, y, w, h, height, Math.floor(h)); errorContainer.layoutPane(x, height + linesWrapper.focusedLine.getHeight(), w, h); if (getSkinnable().getWidth() > 0) { updateTextPos(); } linesWrapper.updateLabelFloatLayout(); if (invalid) { invalid = false; // update validation container errorContainer.invalid(w); // focus linesWrapper.invalid(); } }