newVal.layoutXProperty())); getClip().layoutYProperty() .bind(Bindings.createDoubleBinding(() -> newVal.getLayoutY() + newVal.getHeight() / 2, newVal.heightProperty(), newVal.layoutYProperty()));
/** * Sets the error message as tooltip for the matching control. * * @param below * The control needed for positioning the tooltip. * @param reference * The control which gets the tooltip. */ protected void toggleTooltip(Node reference, Control below) { String fieldTooltip = field.getTooltip(); if ((reference.isFocused() || reference.isHover()) && (!fieldTooltip.equals("") || field.getErrorMessages().size() > 0)) { tooltip.setText((!fieldTooltip.equals("") ? fieldTooltip + "\n" : "") + String.join("\n", field.getErrorMessages())); if (tooltip.isShowing()) { return; } Point2D p = below.localToScene(0.0, 0.0); tooltip.show( getScene().getWindow(), p.getX() + getScene().getX() + getScene().getWindow().getX(), p.getY() + getScene().getY() + getScene().getWindow().getY() + below.getHeight() + 5 ); } else { tooltip.hide(); } }
this.icon.layoutXProperty().bind(this.icon.widthProperty().divide(-2)); this.icon.layoutYProperty().bind(Bindings.createDoubleBinding(() -> { return Double.valueOf(c.getHeight() - this.icon.heightProperty().get() / 2); }, this.icon.heightProperty(), c.heightProperty())); } else if( location == Location.BOTTOM_RIGHT ) { },this.icon.widthProperty(), c.widthProperty())); this.icon.layoutYProperty().bind(Bindings.createDoubleBinding(() -> { return Double.valueOf(c.getHeight() - this.icon.heightProperty().get() / 2); }, this.icon.heightProperty(), c.heightProperty()));
newVal.layoutXProperty())); getClip().layoutYProperty() .bind(Bindings.createDoubleBinding(() -> newVal.getLayoutY() + newVal.getHeight() / 2, newVal.heightProperty(), newVal.layoutYProperty()));