public void setControl(Control control) { maxWidthProperty().bind(control.maxWidthProperty()); prefWidthProperty().bind(control.prefWidthProperty()); prefHeightProperty().bind(control.prefHeightProperty()); errorContainer.setMaxWidth(control.getMaxWidth() > -1 ? control.getMaxWidth() : control.getPrefWidth()); errorContainer.prefWidthProperty().bind(control.widthProperty()); errorContainer.prefHeightProperty().bind(control.heightProperty()); getChildren().clear(); getChildren().add(control); getChildren().add(errorContainer); this.controlProperty.set(control); }
getClip().layoutYProperty() .bind(Bindings.createDoubleBinding(() -> newVal.getLayoutY() + newVal.getHeight() / 2, newVal.heightProperty(), newVal.layoutYProperty())); newVal.heightProperty().addListener((o1, oldVal1, newVal1) -> updateToggleAnimation()); newVal.setOnMouseClicked((click) -> togglePane()); });
public void setControl(Control control) { maxWidthProperty().bind(control.maxWidthProperty()); prefWidthProperty().bind(control.prefWidthProperty()); prefHeightProperty().bind(control.prefHeightProperty()); errorContainer.setMaxWidth(control.getMaxWidth() > -1 ? control.getMaxWidth() : control.getPrefWidth()); errorContainer.prefWidthProperty().bind(control.widthProperty()); errorContainer.prefHeightProperty().bind(control.heightProperty()); getChildren().clear(); getChildren().add(control); getChildren().add(errorContainer); this.controlProperty.set(control); }
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.layoutYProperty().bind(Bindings.createDoubleBinding(() -> { return Double.valueOf(c.getHeight() - this.icon.heightProperty().get() / 2); }, this.icon.heightProperty(), c.heightProperty()));
getClip().layoutYProperty() .bind(Bindings.createDoubleBinding(() -> newVal.getLayoutY() + newVal.getHeight() / 2, newVal.heightProperty(), newVal.layoutYProperty())); newVal.heightProperty().addListener((o1, oldVal1, newVal1) -> updateToggleAnimation()); newVal.setOnMouseClicked((click) -> togglePane()); });