List of usage examples for javafx.scene.layout RowConstraints RowConstraints
public RowConstraints()
From source file:eu.over9000.skadi.ui.dialogs.UpdateAvailableDialog.java
public UpdateAvailableDialog(RemoteVersionResult newVersion) { super(AlertType.INFORMATION, null, UPDATE_BUTTON_TYPE, IGNORE_BUTTON_TYPE); this.setTitle("Update available"); this.setHeaderText(newVersion.getVersion() + " is available"); Label lbChangeLog = new Label("Changelog:"); TextArea taChangeLog = new TextArea(newVersion.getChangeLog()); taChangeLog.setEditable(false);/* www. ja va 2 s . c o m*/ taChangeLog.setWrapText(true); Label lbSize = new Label("Size:"); Label lbSizeValue = new Label(FileUtils.byteCountToDisplaySize(newVersion.getSize())); Label lbPublished = new Label("Published"); Label lbPublishedValue = new Label( ZonedDateTime.parse(newVersion.getPublished()).format(DateTimeFormatter.RFC_1123_DATE_TIME)); final GridPane grid = new GridPane(); RowConstraints vAlign = new RowConstraints(); vAlign.setValignment(VPos.TOP); grid.getRowConstraints().add(vAlign); grid.setHgap(10); grid.setVgap(10); grid.add(lbChangeLog, 0, 0); grid.add(taChangeLog, 1, 0); grid.add(lbPublished, 0, 1); grid.add(lbPublishedValue, 1, 1); grid.add(lbSize, 0, 2); grid.add(lbSizeValue, 1, 2); this.getDialogPane().setContent(grid); }
From source file:Main.java
private GridPane createGridPane() { final GridPane gp = new GridPane(); gp.setPadding(new Insets(10)); gp.setHgap(20);//from w w w . j a v a 2 s . co m //gp.add(albumCover, 0, 0, 1, GridPane.REMAINING); gp.add(title, 1, 0); gp.add(artist, 1, 1); gp.add(album, 1, 2); gp.add(year, 1, 3); final ColumnConstraints c0 = new ColumnConstraints(); final ColumnConstraints c1 = new ColumnConstraints(); c1.setHgrow(Priority.ALWAYS); gp.getColumnConstraints().addAll(c0, c1); final RowConstraints r0 = new RowConstraints(); r0.setValignment(VPos.TOP); gp.getRowConstraints().addAll(r0, r0, r0, r0); return gp; }
From source file:at.ac.tuwien.qse.sepm.gui.controller.impl.HighlightsViewControllerImpl.java
@FXML private void initialize() { tagImageTiles.addAll(Arrays.asList(tag1, tag2, tag3, tag4, tag5)); wikipediaInfoPane = new WikipediaInfoPane(wikipediaService); HBox.setHgrow(wikipediaInfoPane, Priority.ALWAYS); wikipediaInfoPaneContainer.getChildren().addAll(wikipediaInfoPane, wikipediaPlaceholder); wikipediaPlaceholder.setGlyphSize(80); wikipediaInfoPaneContainer.setAlignment(Pos.CENTER); wikipediaPlaceholder.getStyleClass().addAll("wikipedia-placeholder"); wikipediaInfoPane.managedProperty().bind(wikipediaInfoPane.visibleProperty()); wikipediaPlaceholder.visibleProperty().bind(wikipediaInfoPane.visibleProperty().not()); wikipediaInfoPane.setVisible(false); journeyPlaceList.setOnJourneySelected(this::handleJourneySelected); journeyPlaceList.setOnPlaceSelected(this::handlePlaceSelected); journeyPlaceList.setOnAllPlacesSelected(this::handleAllPlacesSelected); // give each row and each column in the grid the same size ColumnConstraints column1 = new ColumnConstraints(); column1.setPercentWidth(25);//from w w w . j a va 2 s . co m ColumnConstraints column2 = new ColumnConstraints(); column2.setPercentWidth(25); ColumnConstraints column3 = new ColumnConstraints(); column3.setPercentWidth(25); ColumnConstraints column4 = new ColumnConstraints(); column4.setPercentWidth(25); gridPane.getColumnConstraints().addAll(column1, column2, column3, column4); RowConstraints row1 = new RowConstraints(); row1.setPercentHeight(33); RowConstraints row2 = new RowConstraints(); row2.setPercentHeight(33); RowConstraints row3 = new RowConstraints(); row3.setPercentHeight(33); gridPane.getRowConstraints().addAll(row1, row2, row3); clusterService.subscribeJourneyChanged((journey) -> scheduler .schedule(() -> Platform.runLater(this::reloadJourneys), 2, TimeUnit.SECONDS)); clusterService.subscribePlaceChanged( (place) -> scheduler.schedule(() -> Platform.runLater(this::reloadJourneys), 2, TimeUnit.SECONDS)); photoService.subscribeCreate(addBuffer::add); reloadJourneys(); }
From source file:AudioPlayer3.java
@Override protected Node initView() { final Label title = createLabel("title"); final Label artist = createLabel("artist"); final Label album = createLabel("album"); final Label year = createLabel("year"); final ImageView albumCover = createAlbumCover(); title.textProperty().bind(songModel.titleProperty()); artist.textProperty().bind(songModel.artistProperty()); album.textProperty().bind(songModel.albumProperty()); year.textProperty().bind(songModel.yearProperty()); albumCover.imageProperty().bind(songModel.albumCoverProperty()); final GridPane gp = new GridPane(); gp.setPadding(new Insets(10)); gp.setHgap(20);//from w ww . ja va 2 s . co m gp.add(albumCover, 0, 0, 1, GridPane.REMAINING); gp.add(title, 1, 0); gp.add(artist, 1, 1); gp.add(album, 1, 2); gp.add(year, 1, 3); final ColumnConstraints c0 = new ColumnConstraints(); final ColumnConstraints c1 = new ColumnConstraints(); c1.setHgrow(Priority.ALWAYS); gp.getColumnConstraints().addAll(c0, c1); final RowConstraints r0 = new RowConstraints(); r0.setValignment(VPos.TOP); gp.getRowConstraints().addAll(r0, r0, r0, r0); return gp; }
From source file:gov.va.isaac.gui.preferences.plugins.ViewCoordinatePreferencesPluginViewController.java
@FXML void initialize() { assert rootStackPaneInTab != null : "fx:id=\"rootStackPaneInTab\" was not injected: check your FXML file 'ViewCoordinatePreferencesPluginView.fxml'."; assert gridPaneInRootStackPane != null : "fx:id=\"gridPaneInRootStackPane\" was not injected: check your FXML file 'ViewCoordinatePreferencesPluginView.fxml'."; assert topGridPane != null : "fx:id=\"topGridPane\" was not injected: check your FXML file 'ViewCoordinatePreferencesPluginView.fxml'."; assert bottomGridPane != null : "fx:id=\"bottomGridPane\" was not injected: check your FXML file 'ViewCoordinatePreferencesPluginView.fxml'."; assert datePicker != null : "fx:id=\"datePicker\" was not injected: check your FXML file 'ViewCoordinatePreferencesPluginView.fxml'."; assert dateSelectionMethodComboBox != null : "fx:id=\"dateSelectionMethodComboBox\" was not injected: check your FXML file 'ViewCoordinatePreferencesPluginView.fxml'."; assert pathComboBox != null : "fx:id=\"pathComboBox\" was not injected: check your FXML file 'ViewCoordinatePreferencesPluginView.fxml'."; assert selectableModuleListView != null : "fx:id=\"selectableModuleListView\" was not injected: check your FXML file 'ViewCoordinatePreferencesPluginView.fxml'."; assert statusesToggleGroupVBox != null : "fx:id=\"statusesToggleGroupVBox\" was not injected: check your FXML file 'ViewCoordinatePreferencesPluginView.fxml'."; assert statedInferredToggleGroupVBox != null : "fx:id=\"statedInferredToggleGroupVBox\" was not injected: check your FXML file 'ViewCoordinatePreferencesPluginView.fxml'."; RowConstraints gridPaneRowConstraints = new RowConstraints(); gridPaneRowConstraints.setVgrow(Priority.NEVER); addGridPaneRowConstraintsToAllRows(gridPaneInRootStackPane, gridPaneRowConstraints); addGridPaneRowConstraintsToAllRows(topGridPane, gridPaneRowConstraints); addGridPaneRowConstraintsToAllRows(bottomGridPane, gridPaneRowConstraints); // currentPathProperty.addListener((observable, oldValue, newValue) -> { // log.debug("currentPathProperty changed from {} to {}", oldValue, newValue); // });//w w w.java 2s . c o m // currentStatedInferredOptionProperty.addListener((observable, oldValue, newValue) -> { // log.debug("currentStatedInferredOptionProperty changed from {} to {}", oldValue, newValue); // }); // currentTimeProperty.addListener((observable, oldValue, newValue) -> { // log.debug("currentTimeProperty changed from {} to {}", oldValue, newValue); // }); // currentStatusesProperty.addListener((observable, oldValue, newValue) -> { // log.debug("currentStatusesProperty changed from {} to {}", Arrays.toString(oldValue.toArray()), Arrays.toString(newValue.toArray())); // }); initializeDatePicker(); initializeDateSelectionMethodComboBox(); initializePathComboBox(); initializeSelectableModuleListView(); initializeStatusesToggleGroup(); initializeStatedInferredToggleGroup(); initializeValidBooleanBinding(); }
From source file:mesclasses.view.JourneeController.java
private void drawEleveName(SmartGrid grid, Eleve eleve, int rowIndex) { //index debute 1, le slot 0,X est rserv pour un separator dans le header grid.add(NodeUtil.buildEleveLink(eleve, eleve.lastNameProperty(), Constants.JOURNEE_VIEW), 1, rowIndex, HPos.LEFT);//from www. j av a 2 s . c o m grid.add(NodeUtil.buildEleveLink(eleve, eleve.firstNameProperty(), Constants.JOURNEE_VIEW), 2, rowIndex, HPos.LEFT); RowConstraints rc = new RowConstraints(); rc.setMinHeight(35.0); rc.setPrefHeight(35.0); rc.setMaxHeight(35.0); grid.getRowConstraints().add(rc); if (!eleve.isInClasse(currentDate.getValue())) { grid.add(new Label("ne faisait pas partie de la classe cette date"), 3, rowIndex, vieScolaireGrid.getGridWidth() - 3, 1); } }