Example usage for javafx.concurrent Worker.State equals

List of usage examples for javafx.concurrent Worker.State equals

Introduction

In this page you can find the example usage for javafx.concurrent Worker.State equals.

Prototype

public boolean equals(Object obj) 

Source Link

Document

Indicates whether some other object is "equal to" this one.

Usage

From source file:org.geopoke.WorldMap.java

public WorldMap() {
        markers = new HashSet<>();
        ready = false;//from   w  w  w.  j av  a2 s  .  c  o m
        webview = new WebView();
        try {
            webview.getEngine().load(new File("googlemap.html").toURI().toURL().toString());
        } catch (MalformedURLException ex) {
            ex.printStackTrace();
        }
        setCenter(webview);
        webview.getEngine().getLoadWorker().stateProperty().addListener(new ChangeListener<Worker.State>() {
            @Override
            public void changed(ObservableValue ov, Worker.State t, Worker.State t1) {
                if (t1.equals(Worker.State.SUCCEEDED)) {
                    ready = true;
                }
            }
        });
    }