List of usage examples for javafx.scene.control Tab setId
public final void setId(String value)
From source file:de.micromata.mgc.javafx.launcher.gui.AbstractConfigDialog.java
public <M extends LocalSettingsConfigModel> boolean addTab( Class<? extends AbstractConfigTabController<M>> controller, M model, String id, String title) { ControllerService cv = ControllerService.get(); Pair<Pane, ? extends AbstractConfigTabController<M>> wc = cv.loadControllerControl(controller, Pane.class, this, id); Tab tab = createTab(model, wc); tab.setId(id); tab.setText(title);//from w w w . j av a 2s . c om return true; }
From source file:ipat_fx.FXMLDocumentController.java
public TabPane getByProfile(HashMap<String, ArrayList<GridPane>> map, int noOfProfiles) { TabPane tabpane = new TabPane(); Tab tabForProfile; FlowPane paneForProfile;//from ww w .j a v a 2s . c o m for (int i = 0; i < noOfProfiles; i++) { tabForProfile = new Tab(); paneForProfile = new FlowPane(); tabForProfile.setId("li_Profile_" + i); tabForProfile.setText("Profile " + i); int j = 0; for (Iterator<String> iterator = map.keySet().iterator(); iterator.hasNext(); j++) { String nameOfArtefact = iterator.next(); ArrayList<GridPane> cells = map.get(nameOfArtefact); paneForProfile.getChildren().add(cells.get(i)); } ScrollPane scrollPane = new ScrollPane(); scrollPane.setContent(paneForProfile); tabForProfile.setContent(scrollPane); tabpane.getTabs().add(tabForProfile); } return tabpane; }
From source file:ipat_fx.FXMLDocumentController.java
public TabPane getByImage(HashMap<String, ArrayList<GridPane>> map) { TabPane tabpane = new TabPane(); Tab tabForImage; FlowPane paneForImage;/*w ww . j av a 2s . co m*/ Iterator<String> iterator = map.keySet().iterator(); while (iterator.hasNext()) { tabForImage = new Tab(); paneForImage = new FlowPane(); String nameOfArtefact = iterator.next(); tabForImage.setId("li_" + nameOfArtefact); tabForImage.setText(nameOfArtefact); ArrayList<GridPane> cells = map.get(nameOfArtefact); for (GridPane cell1 : cells) { GridPane cell = cell1; //paneForImage.add(cell, 0, i); paneForImage.getChildren().add(cell); } ScrollPane scrollPane = new ScrollPane(); scrollPane.setContent(paneForImage); tabForImage.setContent(scrollPane); tabpane.getTabs().add(tabForImage); } return tabpane; }