Example usage for javafx.scene.control MenuItem disableProperty

List of usage examples for javafx.scene.control MenuItem disableProperty

Introduction

In this page you can find the example usage for javafx.scene.control MenuItem disableProperty.

Prototype

public final BooleanProperty disableProperty() 

Source Link

Usage

From source file:ninja.javafx.smartcsv.fx.SmartCSVController.java

private void bindMenuItemsToContentExistence(FileStorage file, MenuItem... items) {
    for (MenuItem item : items) {
        item.disableProperty().bind(isNull(file.contentProperty()));
    }/*from   ww w .j  av  a  2s  .  c  o  m*/
}

From source file:ninja.javafx.smartcsv.fx.SmartCSVController.java

private void bindMenuItemsToTableSelection(MenuItem... items) {
    for (MenuItem item : items) {
        item.disableProperty().bind(lessThan(tableView.getSelectionModel().selectedIndexProperty(), 0));
    }/*from   w w  w  .  j a v a2 s .com*/
}