List of usage examples for javafx.scene.control Tab isSelected
public final boolean isSelected()
Represents whether this tab is the currently selected tab, To change the selected Tab use tabPane.getSelectionModel().select()
From source file:de.perdoctus.ebikeconnect.gui.MainWindowController.java
private void initActivitiesTab() throws Exception { final Parent parent = fxmlLoader.load(getClass().getResourceAsStream("/fxml/ActivitiesOverview.fxml")); this.activitiesOverviewController = fxmlLoader.getController(); final Tab tab = new Tab(rb.getString("activities")); tab.setContent(parent);/*from w w w. j a v a 2 s.com*/ tabPane.getTabs().add(tab); tab.setOnSelectionChanged(event -> { if (tab.isSelected()) { activitiesOverviewController.reloadHeaders(); } }); mnuExport.disableProperty() .bind(activitiesOverviewController.currentActivityDetailsGroupProperty().isNull()); }