Example usage for javafx.event Event consume

List of usage examples for javafx.event Event consume

Introduction

In this page you can find the example usage for javafx.event Event consume.

Prototype

public void consume() 

Source Link

Document

Marks this Event as consumed.

Usage

From source file:com.bekwam.mavenpomupdater.AboutDelegate.java

public void init() {

    if (log.isDebugEnabled()) {
        log.debug("[INIT] version=" + version);
    }/*from w  w w .j  av a 2 s.c  o  m*/

    Image image = new Image("images/mpu_about.jpg");
    imageView.setImage(image);

    aboutTab.setOnCloseRequest(new EventHandler<Event>() {
        @Override
        public void handle(Event arg0) {
            if (log.isDebugEnabled()) {
                log.debug("[ABOUT CLOSED]");
            }

            if (tabPane.getTabs().contains(aboutTab)) {
                tabPane.getTabs().remove(aboutTab);
            }

            // needs alt selection here too?

            arg0.consume();
        }
    });

    aboutVersionLabel.setText(version);

    tabPane.getTabs().remove(aboutTab); // start w/o it showing

}