Example usage for javafx.scene.layout Region Region

List of usage examples for javafx.scene.layout Region Region

Introduction

In this page you can find the example usage for javafx.scene.layout Region Region.

Prototype

public Region() 

Source Link

Document

Creates a new Region with an empty Background and and empty Border.

Usage

From source file:poe.trade.assist.SearchForm.java

public SearchForm(String title, Main main, ResultPane resultPane) {
    super(title);
    setOnSelectionChanged(e -> {/*from   w w  w .  ja v a2 s  . c  om*/
        if (this.isSelected()) {
            loadUp();
        }
    });
    search.addListener((obs, oldVal, newVal) -> {
        if (newVal != null) {
            if (this.isSelected()) {
                loadUp();
            }
        }
    });
    webEngine.getLoadWorker().stateProperty().addListener((observ, oldVal, newVal) -> {
        if (newVal.equals(Worker.State.SUCCEEDED)) {
            //            System.out.println("LOAOOOOOOOOOOOOOOOOOOOOOD");
            //            JSObject window = (JSObject) webEngine.executeScript("window");
            //            webEngine.executeScript("onBluemarlineReady()");
            //            window.setMember("assistcallback", this);
            //            System.out.println(search.get().getUrl());
            //            System.out.println(webEngine.getLocation());
            if (StringUtils.isNotBlank(webEngine.getLocation())
                    && !search.get().getUrl().equalsIgnoreCase(webEngine.getLocation())) {
                search.get().setUrl(webEngine.getLocation());
                //               main.refreshResultColumn();
                //               main.selectFromSearchList(search.get());
                //               SearchForm.this.getTabPane().getSelectionModel().clearAndSelect(0);
            }
        }
    });
    //      searchPostService.setOnSucceeded(e -> {
    //         search.get().setUrl(searchPostService.getValue());
    //         main.refreshResultColumn();
    //         resultPane.setSearch(search.get());
    //         SearchForm.this.getTabPane().getSelectionModel().clearAndSelect(2);
    //      });
    Region veilOfTheNight = new Region();
    veilOfTheNight.setStyle("-fx-background-color: rgba(0, 0, 0, 0.3)");
    ProgressIndicator progressIndicator = new ProgressIndicator(-1.0f);
    veilOfTheNight.visibleProperty().bind(progressIndicator.visibleProperty());
    progressIndicator.visibleProperty().bind(searchFormService.runningProperty());
    //      progressIndicator.visibleProperty().bind(searchFormService.runningProperty().or(searchPostService.runningProperty()));
    setContent(new StackPane(webView, veilOfTheNight, progressIndicator));
}