Package javafx.beans

Examples of javafx.beans.InvalidationListener


     * @param driverChangHandler  the code to update the slider bases on the
     *                            value of the driving property. This will be wrapped in a
     *                            remove/add-listener pair to prevent circular updates.
     */
    private <T> void initializeSlider(Slider slider, Runnable sliderChangeHandler, ReadOnlyObjectProperty<T> driver, Runnable driverChangHandler) {
        final InvalidationListener sliderListener = observable -> {
            if (slider.isValueChanging() == false) {
                sliderChangeHandler.run();
            }
        };
        slider.valueProperty().addListener(sliderListener);
View Full Code Here


                public void handle(ActionEvent e) {
                    mediaPlayer.stop();
                }
            });

            progressSlider.valueProperty().addListener(new InvalidationListener() {
                @Override
                public void invalidated(Observable o) {
                    if (progressSlider.isValueChanging()) {
                        mediaPlayer.seek(duration.multiply(progressSlider.getValue() / 100.0));
                    }
View Full Code Here

        if (!Main.instance.updatesURL.equals(Main.UPDATES_BASE_URL))
            updater.setOverrideURLs(true);    // For testing.

        // Only bother to show the user a notification if we're actually going to download an update.
        updater.progressProperty().addListener(new InvalidationListener() {
            private boolean shown = false;

            @Override
            public void invalidated(Observable x) {
                if (shown) return;
View Full Code Here

TOP

Related Classes of javafx.beans.InvalidationListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.