List of usage examples for javafx.scene.control Button focusedProperty
public final ReadOnlyBooleanProperty focusedProperty()
From source file:de.ks.text.AsciiDocEditor.java
private void addCommands() { editorCommands.forEach(c -> {// w w w .j a va 2 s . co m Button button = new Button(); button.setMnemonicParsing(true); button.focusedProperty().addListener((p, o, n) -> { if (n) { focusOnEditor = false; } }); c.initialize(this, button); this.commands.put(c.getClass(), c); button.setText(Localized.get(c.getName())); button.setOnAction(e -> c.execute(editor)); editorCommandPane.getChildren().add(button); }); }