SimpleIntegerProperty avgProperty = new SimpleIntegerProperty(); this.setAvg((Property<T>)avgProperty ); avgProperty.addListener(new ChangeListener<Number>() { SimpleIntegerProperty maxProperty = new SimpleIntegerProperty(); this.setMax((Property<T>) maxProperty); maxProperty.addListener(new ChangeListener<Number>() {
elementsCountProperty().addListener((ChangeListener<Number>) (observable, oldValue, newValue) -> { if (newValue.intValue() > 0) { itemsCount.textProperty().set("");
public void hide() { if (dialogStage != null) { dispatchEvent(new HideDialogEvent(dialogStage)); Platform.runLater(() -> { SimpleIntegerProperty toto = new SimpleIntegerProperty(50); toto.addListener((ChangeListener<Number>) (observable, oldValue, newValue) -> { dialogStage.setWidth(dialogStage.getWidth() * (1 / newValue.doubleValue())); dialogStage.setHeight(dialogStage.getHeight() * (1 / newValue.doubleValue())); }); EasingInterpolator interpolator = new EasingInterpolator(EasingMode.SWING_FROM); final Timeline timeline = new Timeline(); KeyFrame kf = new KeyFrame(new Duration(200), new KeyValue(toto, 1, interpolator)); timeline.getKeyFrames().addAll(kf); timeline.setOnFinished(e -> dialogStage.hide()); timeline.play(); }); } }
elementsCountProperty().addListener((ChangeListener<Number>) (observable, oldValue, newValue) -> { if (newValue.intValue() > 0) { totalElementsCountLabel.textProperty().set("");
@Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { this.configuration = configuration; this.controller = (AbstractViewController) controller; NodeHelper.loadFXML(getFxmlLocation(), this); filterTextField.managedProperty().bind(filterTextField.visibleProperty()); filterTextField.setVisible(false); filterTextField.setPromptText("Find in table"); if (configuration != null) { NodeHelper.setTitle(title, configuration, (AbstractViewController) controller, true); NodeHelper.styleClassSetAll(title, configuration, "titleStyleClass", "ep-edit-structure-title-label"); NodeHelper.styleClassAddAll(tableHeaderRootPane, configuration, "styleClass"); title.visibleProperty().bind(Bindings.isNotEmpty(title.textProperty())); elementsCountProperty().addListener((ChangeListener<Number>) (observable, oldValue, newValue) -> { if (newValue.intValue() > 0) { itemsCount.textProperty().set(""); } else { itemsCount.textProperty().set(String.format(dynMessageFormat, newValue.intValue())); } }); ((FullTableStructureController) controller).processedElementProperty().addListener((ChangeListener<Object>) (observable, oldValue, newValue) -> { final AbstractTableStructure ts = (AbstractTableStructure) ((FullTableStructureController) controller).processedElementProperty().get(); doLayout(ts); buildFiltering(ts); }); } }