Example usage for javafx.beans.binding Bindings concat

List of usage examples for javafx.beans.binding Bindings concat

Introduction

In this page you can find the example usage for javafx.beans.binding Bindings concat.

Prototype

public static StringExpression concat(Object... args) 

Source Link

Document

Returns a javafx.beans.binding.StringExpression that holds the value of the concatenation of multiple Objects .

Usage

From source file:de.pixida.logtest.designer.MainWindow.java

private void bindEditorDependentProperties() {
    StringExpression titlePropertyBinding;
    BooleanProperty fileHandlingEnabled;
    final Editor currentEditor = this.getCurrentEditor();
    if (currentEditor == null) {
        titlePropertyBinding = Bindings.concat(APP_TITLE);
        fileHandlingEnabled = new SimpleBooleanProperty(false);
    } else {/*from  w  ww  .j  a  v a  2s.  c  o  m*/
        titlePropertyBinding = Bindings.concat(currentEditor.getTypeName() + " - ")
                .concat(currentEditor.getTitleLong()).concat(" - " + APP_TITLE);
        fileHandlingEnabled = currentEditor.supportsFilesProperty();
    }
    this.primaryStage.titleProperty().bind(titlePropertyBinding);
    this.menuItemSave.disableProperty().bind(fileHandlingEnabled.not());
    this.menuItemSaveAs.disableProperty().bind(fileHandlingEnabled.not());
}