errorLabel.heightProperty().addListener((o, oldVal, newVal) -> { if (errorShown) { if (oldErrorLabelHeight == -1) {
this.icon.layoutYProperty().bind(this.icon.heightProperty().divide(-2)); } else if( location == Location.TOP_RIGHT ) { this.icon.layoutXProperty().bind(Bindings.createDoubleBinding(() -> { return Double.valueOf(c.getWidth() - this.icon.widthProperty().get() / 2); },this.icon.widthProperty(), c.widthProperty())); this.icon.layoutYProperty().bind(this.icon.heightProperty().divide(-2)); } else if( location == Location.BOTTOM_LEFT ) { 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.layoutXProperty().bind(Bindings.createDoubleBinding(() -> { },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()));
message.heightProperty().addListener((observable, oldValue, newValue) -> { bubble.setHeight(newValue.doubleValue() + 10); Platform.runLater(new Runnable() {
barGroup.setTranslateY(0); label.setTranslateX(0); label.translateYProperty().bind(height.divide(2).subtract(label.heightProperty().divide(2))); break; case RIGHT: barGroup.setTranslateY(0); label.translateXProperty().bind(width.add(10)); label.translateYProperty().bind(height.divide(2).subtract(label.heightProperty().divide(2))); break; case TOP: barGroup.setTranslateX(0); barGroup.translateYProperty().bind(label.heightProperty()); label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2))); label.setTranslateY(0);
barGroup.setTranslateY(0); label.setTranslateX(0); label.translateYProperty().bind(height.divide(2).subtract(label.heightProperty().divide(2))); break; case RIGHT: barGroup.setTranslateY(0); label.translateXProperty().bind(width.add(10)); label.translateYProperty().bind(height.divide(2).subtract(label.heightProperty().divide(2))); break; case TOP: barGroup.setTranslateX(0); barGroup.translateYProperty().bind(label.heightProperty()); label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2))); label.setTranslateY(0);
errorLabel.heightProperty().addListener((o, oldVal, newVal) -> { if (errorShown) { if (oldErrorLabelHeight == -1) {