public void setSecondaryProgress(double secondaryProgress) { secondaryProgressProperty().set(secondaryProgress); } }
public JFXProgressBarSkin(JFXProgressBar bar) { super(bar); bar.widthProperty().addListener(observable -> { updateProgress(); updateSecondaryProgress(); }); registerChangeListener(bar.secondaryProgressProperty(), "SECONDARY_PROGRESS"); registerChangeListener(bar.visibleProperty(), "VISIBLE"); registerChangeListener(bar.parentProperty(), "PARENT"); registerChangeListener(bar.sceneProperty(), "SCENE"); getSkinnable().requestLayout(); }
/** * init fxml when loaded. */ @PostConstruct public void init() { Timeline task = new Timeline( new KeyFrame( Duration.ZERO, new KeyValue(progress1.progressProperty(), 0), new KeyValue(progress2.progressProperty(), 0), new KeyValue(progress2.secondaryProgressProperty(), 0.5)), new KeyFrame( Duration.seconds(1), new KeyValue(progress2.secondaryProgressProperty(), 1)), new KeyFrame( Duration.seconds(2), new KeyValue(progress1.progressProperty(), 1), new KeyValue(progress2.progressProperty(), 1))); task.setCycleCount(Timeline.INDEFINITE); task.play(); }
Duration.ZERO, new KeyValue(bar.progressProperty(), 0), new KeyValue(jfxBar.secondaryProgressProperty(), 0), new KeyValue(jfxBar.progressProperty(), 0)), new KeyFrame( Duration.seconds(1), new KeyValue(jfxBar.secondaryProgressProperty(), 1)), new KeyFrame( Duration.seconds(2),
public void setSecondaryProgress(double secondaryProgress) { secondaryProgressProperty().set(secondaryProgress); } }
public JFXProgressBarSkin(JFXProgressBar bar) { super(bar); bar.widthProperty().addListener(observable -> { updateProgress(); updateSecondaryProgress(); }); registerChangeListener(bar.progressProperty(), (obs) -> updateProgress()); registerChangeListener(bar.secondaryProgressProperty(), obs-> updateSecondaryProgress()); registerChangeListener(bar.visibleProperty(), obs->updateAnimation()); registerChangeListener(bar.parentProperty(), obs->updateAnimation()); registerChangeListener(bar.sceneProperty(), obs->updateAnimation()); unregisterChangeListeners(NodeHelper.treeShowingProperty(bar)); unregisterChangeListeners(bar.indeterminateProperty()); registerChangeListener(NodeHelper.treeShowingProperty(bar), obs -> this.updateAnimation()); registerChangeListener(bar.indeterminateProperty(), obs->initialize()); initialize(); getSkinnable().requestLayout(); }