List of usage examples for javafx.scene.control Tab textProperty
public final StringProperty textProperty()
From source file:de.pixida.logtest.designer.MainWindow.java
private void addEditorAsNewTab(final Editor editor) { final Tab newTab = new Tab(); newTab.setContent(editor);/*from ww w. ja v a2s . c o m*/ newTab.setGraphic(Icons.getIconGraphics(editor.getIconName())); newTab.textProperty().bind(editor.getTitleShort()); newTab.setOnCloseRequest(event -> { if (!this.handleCloseTab()) { event.consume(); // Do not continue / leave tab open } }); this.tabPane.getTabs().add(newTab); this.tabPane.getSelectionModel().select(newTab); }