當前位置: 首頁>>代碼示例>>Java>>正文


Java RowConstraints.setMinHeight方法代碼示例

本文整理匯總了Java中javafx.scene.layout.RowConstraints.setMinHeight方法的典型用法代碼示例。如果您正苦於以下問題:Java RowConstraints.setMinHeight方法的具體用法?Java RowConstraints.setMinHeight怎麽用?Java RowConstraints.setMinHeight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.layout.RowConstraints的用法示例。


在下文中一共展示了RowConstraints.setMinHeight方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: updateRowConstraints

import javafx.scene.layout.RowConstraints; //導入方法依賴的package包/類
private void updateRowConstraints() {
    int rowCount = 32; // header + 31 days
    if (getSkinnable().getWeekDayLayout() == WeekDayLayoutStrategy.ALIGNED) {
        rowCount += 6; // 6 = max number of empty slots / cells at the top
    }

    List<RowConstraints> rowConstraints = new ArrayList<>();
    for (int i = 0; i <= rowCount; i++) {
        RowConstraints con = new RowConstraints();
        con.setFillHeight(true);
        con.setPrefHeight(Region.USE_COMPUTED_SIZE);
        con.setMinHeight(Region.USE_PREF_SIZE);
        con.setMaxHeight(Double.MAX_VALUE);
        con.setVgrow(i == 0 ? Priority.NEVER : Priority.ALWAYS);
        rowConstraints.add(con);
    }

    grid.getRowConstraints().setAll(rowConstraints);
}
 
開發者ID:dlemmermann,項目名稱:CalendarFX,代碼行數:20,代碼來源:MonthSheetViewSkin.java

示例2: drawCurrentPeriod

import javafx.scene.layout.RowConstraints; //導入方法依賴的package包/類
public void drawCurrentPeriod() {
    ArrayList<LocalDate> days = getCalendarDays(this.year, this.month);
    calendarGrid.getChildren().removeAll(calendarSquares);
    calendarGrid.getRowConstraints().removeAll(squareRowConstraints);
    calendarSquares = new ArrayList<>();

    for (int i = 0; i < days.size() / 7; i++) {
        RowConstraints r = new RowConstraints();
        r.setMinHeight(100);
        r.setVgrow(Priority.ALWAYS);
        squareRowConstraints.add(r);
        calendarGrid.getRowConstraints().add(r);

        for (int j = 0; j < 7; j++) {
            MonthCalendarSquare square = new MonthCalendarSquare(days.get(j + i * 7), this.month);

            if (j == 0) {
                square.getStyleClass().add("first-in-row");
            }

            calendarSquares.add(square);
            calendarGrid.add(square, j, i + 1);
        }
    }
}
 
開發者ID:Fellesprosjekt-27,項目名稱:fellesprosjekt,代碼行數:26,代碼來源:MonthCalendarComponent.java

示例3: toggleVisibility

import javafx.scene.layout.RowConstraints; //導入方法依賴的package包/類
private void toggleVisibility(RowConstraints row,
                              FilteredList<Node> children,
                              boolean show) {
    if (show) {
        row.setMaxHeight(USE_COMPUTED_SIZE);
        row.setMinHeight(10);
    } else {
        row.setMaxHeight(0);
        row.setMinHeight(0);
    }

    children.forEach(n -> {
        n.setVisible(show);
        n.setManaged(show);
    });
}
 
開發者ID:speedment,項目名稱:speedment,代碼行數:17,代碼來源:ConnectController.java

示例4: updateVisibility

import javafx.scene.layout.RowConstraints; //導入方法依賴的package包/類
private void updateVisibility() {
    for (int row = 0; row < 6; row++) {
        RowConstraints rowConstraints = new RowConstraints();
        rowConstraints.setFillHeight(true);
        rowConstraints.setMinHeight(Region.USE_PREF_SIZE);
        rowConstraints.setMaxHeight(Region.USE_COMPUTED_SIZE);
        rowConstraints.setPrefHeight(Region.USE_COMPUTED_SIZE);
        rowConstraints.setVgrow(Priority.ALWAYS);
        gridPane.getRowConstraints().add(rowConstraints);
    }

    ColumnConstraints weekColumn = new ColumnConstraints();
    weekColumn.setHalignment(HPos.RIGHT);
    weekColumn.setMaxWidth(Region.USE_COMPUTED_SIZE);
    weekColumn.setMinWidth(Region.USE_PREF_SIZE);
    weekColumn.setPrefWidth(Region.USE_COMPUTED_SIZE);
    weekColumn.setFillWidth(true);
    weekColumn.setHgrow(Priority.NEVER);
    gridPane.getColumnConstraints().add(weekColumn);

    for (int col = 0; col < 7; col++) {
        ColumnConstraints columnConstraints = new ColumnConstraints();
        columnConstraints.setHalignment(HPos.CENTER);
        columnConstraints.setMaxWidth(Region.USE_COMPUTED_SIZE);
        columnConstraints.setMinWidth(Region.USE_PREF_SIZE);
        columnConstraints.setPrefWidth(Region.USE_COMPUTED_SIZE);
        columnConstraints.setFillWidth(true);
        columnConstraints.setHgrow(Priority.ALWAYS);
        gridPane.getColumnConstraints().add(columnConstraints);
    }
}
 
開發者ID:dlemmermann,項目名稱:CalendarFX,代碼行數:32,代碼來源:YearMonthViewSkin.java

示例5: YearViewSkin

import javafx.scene.layout.RowConstraints; //導入方法依賴的package包/類
public YearViewSkin(YearView view) {
    super(view);

    view.dateProperty().addListener(evt -> updateMonths());

    GridPane gridPane = new GridPane();
    gridPane.getStyleClass().add("container");
    gridPane.setMaxSize(MAX_VALUE, MAX_VALUE);

    for (int row = 0; row < 3; row++) {
        RowConstraints rowConstraints = new RowConstraints();
        rowConstraints.setMinHeight(Region.USE_PREF_SIZE);
        rowConstraints.setPrefHeight(Region.USE_COMPUTED_SIZE);
        rowConstraints.setMaxHeight(Region.USE_COMPUTED_SIZE);
        rowConstraints.setVgrow(Priority.ALWAYS);
        rowConstraints.setValignment(VPos.CENTER);
        gridPane.getRowConstraints().add(rowConstraints);
    }

    for (int col = 0; col < 4; col++) {
        ColumnConstraints colConstraints = new ColumnConstraints();
        colConstraints.setMinWidth(Region.USE_PREF_SIZE);
        colConstraints.setPrefWidth(Region.USE_COMPUTED_SIZE);
        colConstraints.setMaxWidth(Region.USE_COMPUTED_SIZE);
        colConstraints.setHgrow(Priority.ALWAYS);
        colConstraints.setHalignment(HPos.CENTER);
        gridPane.getColumnConstraints().add(colConstraints);
    }

    for (int row = 0; row < 3; row++) {
        for (int col = 0; col < 4; col++) {
            Month month = Month.of(row * 4 + col + 1);

            YearMonthView yearMonthView = view.getMonthView(month);
            yearMonthView.setShowMonthArrows(false);
            yearMonthView.setShowTodayButton(false);
            yearMonthView.setShowUsageColors(true);
            yearMonthView.setClickBehaviour(YearMonthView.ClickBehaviour.SHOW_DETAILS);
            gridPane.add(yearMonthView, col, row);

            // do not bind date, we manage it manually
            view.bind(yearMonthView, false);
        }
    }

    getChildren().add(gridPane);

    updateMonths();
}
 
開發者ID:dlemmermann,項目名稱:CalendarFX,代碼行數:50,代碼來源:YearViewSkin.java

示例6: initializeEditorCanvas

import javafx.scene.layout.RowConstraints; //導入方法依賴的package包/類
private void initializeEditorCanvas() {
    //reset canvas from eventual previous labyrinths
    resetCanvas();

    //make sure we know the current size
    updateCanvasSize();

    //calculate the TILE_SIZE appropriate for the window size and size of the Labyrinth
    int smallerCanvasDimension = Integer.min(CANVAS_HEIGHT, CANVAS_WIDTH) - 2 * MARGIN;
    int largerLabyrinthDimension = Integer.max(labyrinth.getHeight(), labyrinth.getWidth());

    TILE_SIZE = smallerCanvasDimension / largerLabyrinthDimension;


    //set size of the GridView
    RowConstraints rowConstraints = new RowConstraints();
    rowConstraints.setPrefHeight(TILE_SIZE);
    rowConstraints.setMinHeight(TILE_SIZE);
    rowConstraints.setMaxHeight(TILE_SIZE);

    for (int rowIndex = 0; rowIndex < labyrinth.getHeight(); rowIndex++) {
        canvasGridPane.addRow(rowIndex);
        canvasGridPane.getRowConstraints().add(rowConstraints);
    }

    ColumnConstraints columnConstraints = new ColumnConstraints();
    columnConstraints.setPrefWidth(TILE_SIZE);
    columnConstraints.setMinWidth(TILE_SIZE);
    columnConstraints.setMaxWidth(TILE_SIZE);

    for (int colIndex = 0; colIndex < labyrinth.getWidth(); colIndex++) {
        canvasGridPane.addRow(colIndex);
        canvasGridPane.getColumnConstraints().add(columnConstraints);
    }
}
 
開發者ID:severinkaderli,項目名稱:Modul-326-Labyrinth-Editor,代碼行數:36,代碼來源:EditorController.java

示例7: PrintViewSkin

import javafx.scene.layout.RowConstraints; //導入方法依賴的package包/類
public PrintViewSkin(PrintView control) {
    super(control);

    GridPane gridPane = new GridPane();
    gridPane.getStyleClass().add("container");
    gridPane.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);

    RowConstraints row1 = new RowConstraints();
    RowConstraints row2 = new RowConstraints();

    ColumnConstraints col1 = new ColumnConstraints();
    ColumnConstraints col2 = new ColumnConstraints();
    ColumnConstraints col3 = new ColumnConstraints();

    row1.setVgrow(Priority.ALWAYS);
    row2.setVgrow(Priority.NEVER);

    col1.setHgrow(Priority.ALWAYS);
    col2.setHgrow(Priority.NEVER);
    col3.setHgrow(Priority.NEVER);

    row1.setFillHeight(true);
    row2.setFillHeight(true);

    col1.setFillWidth(true);
    col2.setFillWidth(true);
    col3.setFillWidth(true);

    col1.setMaxWidth(Double.MAX_VALUE);
    col3.setMaxWidth(Region.USE_PREF_SIZE);
    col3.setMinWidth(Region.USE_PREF_SIZE);

    row1.setMaxHeight(Double.MAX_VALUE);
    row2.setMinHeight(Region.USE_PREF_SIZE);

    gridPane.getRowConstraints().setAll(row1, row2);
    gridPane.getColumnConstraints().setAll(col1, col2, col3);

    // preview pane
    PreviewPane previewPane = control.getPreviewPane();
    gridPane.add(previewPane, 0, 0);
    GridPane.setRowSpan(previewPane, 2);

    // settings
    SettingsView settingsView = control.getSettingsView();
    gridPane.add(settingsView, 2, 0);

    // separator
    Separator separator = new Separator();
    separator.setOrientation(Orientation.VERTICAL);
    GridPane.setRowSpan(separator, 2);
    gridPane.add(separator, 1, 0);

    // button bar
    Button cancelBtn = new Button(Messages.getString("PrintView.CANCEL_BUTTON"));
    cancelBtn.onActionProperty().bind(control.onCancelProperty());

    Button continueBtn = new Button(Messages.getString("PrintView.CONTINUE_BUTTON"));
    continueBtn.onActionProperty().bind(control.onContinueProperty());

    HBox buttonsBar = new HBox();
    buttonsBar.getStyleClass().add("button-bar");
    buttonsBar.getChildren().addAll(cancelBtn, continueBtn);

    gridPane.add(buttonsBar, 2, 1);

    getChildren().add(gridPane);
}
 
開發者ID:dlemmermann,項目名稱:CalendarFX,代碼行數:69,代碼來源:PrintViewSkin.java

示例8: Actions

import javafx.scene.layout.RowConstraints; //導入方法依賴的package包/類
public Actions() {

        columnConstraints = new ColumnConstraints();
        columnConstraints0 = new ColumnConstraints();
        columnConstraints1 = new ColumnConstraints();
        rowConstraints = new RowConstraints();
        button = new Button();
        button0 = new Button();
        button1 = new Button();

        setPrefHeight(32.0);
        setPrefWidth(186.0);
        setStyle("-fx-background-color: none;");
        getStylesheets().add("/view/common/../../css/main.css");

        columnConstraints.setHgrow(javafx.scene.layout.Priority.SOMETIMES);
        columnConstraints.setMaxWidth(120.0);
        columnConstraints.setMinWidth(10.0);
        columnConstraints.setPrefWidth(95.0);

        columnConstraints0.setHgrow(javafx.scene.layout.Priority.SOMETIMES);
        columnConstraints0.setMaxWidth(150.0);
        columnConstraints0.setMinWidth(10.0);
        columnConstraints0.setPrefWidth(100.0);

        columnConstraints1.setHgrow(javafx.scene.layout.Priority.SOMETIMES);
        columnConstraints1.setMaxWidth(192.0);
        columnConstraints1.setMinWidth(10.0);
        columnConstraints1.setPrefWidth(110.0);

        rowConstraints.setMinHeight(10.0);
        rowConstraints.setPrefHeight(30.0);
        rowConstraints.setVgrow(javafx.scene.layout.Priority.SOMETIMES);

        button.setDefaultButton(true);
        button.setMnemonicParsing(false);
        button.setOnAction(this::handleEditButton);
        button.setText("Edit");

        GridPane.setColumnIndex(button0, 1);
        button0.setMnemonicParsing(false);
        button0.setOnAction(this::handleViewButton);
        button0.getStyleClass().add("btn-primary");
        button0.setText("View");

        GridPane.setColumnIndex(button1, 2);
        button1.setCancelButton(true);
        button1.setMnemonicParsing(false);
        button1.setOnAction(this::handleDeleteButton);
        button1.setText("Delete");

        getColumnConstraints().add(columnConstraints);
        getColumnConstraints().add(columnConstraints0);
        getColumnConstraints().add(columnConstraints1);
        getRowConstraints().add(rowConstraints);
        getChildren().add(button);
        getChildren().add(button0);
        getChildren().add(button1);

    }
 
開發者ID:kmrifat,項目名稱:Dr-Assistant,代碼行數:61,代碼來源:Actions.java

示例9: createChart

import javafx.scene.layout.RowConstraints; //導入方法依賴的package包/類
/**
 * 
 */
public void createChart() {
	
	
	// Add the row constraint (we only have one row)
	RowConstraints row = new RowConstraints();
	row.setMinHeight(5);
	row.setPrefHeight(Control.USE_COMPUTED_SIZE);
	row.setMaxHeight(Control.USE_COMPUTED_SIZE);
	row.setFillHeight(true);
	row.setVgrow(Priority.ALWAYS);
	this.chartGridPane.getRowConstraints().add(row);
	
	for(int column_index=0; column_index<data[0].length; column_index++) {
		
		FXMLLoader loader = new FXMLLoader(getClass().getResource("BarColumn.fxml"));
		
		try {
			
			VBox barColumn = (VBox) loader.load();
			BarColumnController barColumnController = loader.getController();

			barColumnController.setData(data);
			barColumnController.setColumnIndex(column_index);
			barColumnController.setAlphabet("dna");
			barColumnController.setLabels(labels);
			barColumnController.drawColumn();
			
			this.chartGridPane.add(barColumn, column_index, 0);
			
			// Set the column constraints
			ColumnConstraints col = new ColumnConstraints();
			col.setMinWidth(5);
			col.setPrefWidth(Control.USE_COMPUTED_SIZE);
			col.setMaxWidth(Control.USE_COMPUTED_SIZE);
			col.setFillWidth(true);
			col.setHgrow(Priority.ALWAYS);
			this.chartGridPane.getColumnConstraints().add(col);
			
			
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}
	
}
 
開發者ID:drivenbyentropy,項目名稱:aptasuite,代碼行數:50,代碼來源:LogoChartPanelController.java

示例10: create

import javafx.scene.layout.RowConstraints; //導入方法依賴的package包/類
public AnchorPane create() throws Exception {
    AnchorPane anchorPane37 = new AnchorPane();
    anchorPane37.setId("AnchorPane");
    anchorPane37.setMinHeight(Control.USE_PREF_SIZE);
    anchorPane37.setMinWidth(Control.USE_PREF_SIZE);
    anchorPane37.setPrefHeight(Control.USE_COMPUTED_SIZE);
    anchorPane37.setPrefWidth(Control.USE_COMPUTED_SIZE);
    TitledPane titledPane33 = new TitledPane();
    titledPane33.setAnimated(false);
    titledPane33.setCollapsible(false);
    titledPane33.setExpanded(true);
    titledPane33.setPrefHeight(Control.USE_COMPUTED_SIZE);
    titledPane33.setPrefWidth(Control.USE_COMPUTED_SIZE);
    titledPane33.setText(bundle.getString("SOYStyleSection"));
    AnchorPane.setBottomAnchor(titledPane33, 0.0);
    AnchorPane.setLeftAnchor(titledPane33, 0.0);
    AnchorPane.setRightAnchor(titledPane33, 0.0);
    AnchorPane.setTopAnchor(titledPane33, 0.0);
    VBox vBox65 = new VBox();
    vBox65.setPrefHeight(Control.USE_COMPUTED_SIZE);
    vBox65.setPrefWidth(Control.USE_COMPUTED_SIZE);
    Label label80 = new Label();
    label80.setMinWidth(100.0);
    label80.setText(bundle.getString("SOYStyleSection_Desc"));
    label80.setWrapText(true);
    vBox65.getChildren().add(label80);
    GridPane gridPane74 = new GridPane();
    gridPane74.setHgap(5.0);
    controlCodeStyleBuilder = new RadioButton();
    controlCodeStyleBuilder.setMnemonicParsing(false);
    controlCodeStyleBuilder.setText(bundle.getString("SOYStyleSection_String"));
    GridPane.setColumnIndex(controlCodeStyleBuilder, 0);
    GridPane.setRowIndex(controlCodeStyleBuilder, 0);
    styleGroup = new ToggleGroup();
    controlCodeStyleBuilder.setToggleGroup(styleGroup);
    gridPane74.getChildren().add(controlCodeStyleBuilder);
    controlCodeStyleConcat = new RadioButton();
    controlCodeStyleConcat.setMnemonicParsing(false);
    controlCodeStyleConcat.setText(bundle.getString("SOYStyleSection_Concatenation"));
    controlCodeStyleConcat.setToggleGroup(styleGroup);
    GridPane.setColumnIndex(controlCodeStyleConcat, 1);
    GridPane.setRowIndex(controlCodeStyleConcat, 0);
    gridPane74.getChildren().add(controlCodeStyleConcat);
    ColumnConstraints columnConstraints168 = new ColumnConstraints();
    columnConstraints168.setHgrow(Priority.NEVER);
    columnConstraints168.setMinWidth(Control.USE_COMPUTED_SIZE);
    columnConstraints168.setPrefWidth(Control.USE_COMPUTED_SIZE);
    gridPane74.getColumnConstraints().add(columnConstraints168);
    ColumnConstraints columnConstraints169 = new ColumnConstraints();
    columnConstraints169.setHgrow(Priority.NEVER);
    columnConstraints169.setMinWidth(Control.USE_COMPUTED_SIZE);
    columnConstraints169.setPrefWidth(Control.USE_COMPUTED_SIZE);
    gridPane74.getColumnConstraints().add(columnConstraints169);
    RowConstraints rowConstraints147 = new RowConstraints();
    rowConstraints147.setMinHeight(10.0);
    rowConstraints147.setPrefHeight(30.0);
    rowConstraints147.setVgrow(Priority.SOMETIMES);
    gridPane74.getRowConstraints().add(rowConstraints147);
    vBox65.getChildren().add(gridPane74);
    Insets insets100 = new Insets(10.0, 10.0, 10.0, 10.0);
    vBox65.setPadding(insets100);
    titledPane33.setContent(vBox65);
    anchorPane37.getChildren().add(titledPane33);
    initialize(null, bundle);
    return anchorPane37;
}
 
開發者ID:DigiArea,項目名稱:closurefx-builder,代碼行數:67,代碼來源:SOYStyleSectionController.java

示例11: create

import javafx.scene.layout.RowConstraints; //導入方法依賴的package包/類
public AnchorPane create() throws Exception {
    AnchorPane anchorPane11 = new AnchorPane();
    anchorPane11.setId("AnchorPane");
    anchorPane11.setMinHeight(Control.USE_PREF_SIZE);
    anchorPane11.setMinWidth(Control.USE_PREF_SIZE);
    anchorPane11.setPrefHeight(Control.USE_COMPUTED_SIZE);
    anchorPane11.setPrefWidth(Control.USE_COMPUTED_SIZE);
    TitledPane titledPane10 = new TitledPane();
    titledPane10.setAnimated(false);
    titledPane10.setPrefHeight(Control.USE_COMPUTED_SIZE);
    titledPane10.setPrefWidth(Control.USE_COMPUTED_SIZE);
    titledPane10.setText(bundle.getString("GSSVendorSection"));
    AnchorPane.setBottomAnchor(titledPane10, 0.0);
    AnchorPane.setLeftAnchor(titledPane10, 0.0);
    AnchorPane.setRightAnchor(titledPane10, 0.0);
    AnchorPane.setTopAnchor(titledPane10, 0.0);
    GridPane gridPane27 = new GridPane();
    gridPane27.setId("GridPane");
    gridPane27.setMinHeight(Control.USE_PREF_SIZE);
    gridPane27.setMinWidth(Control.USE_PREF_SIZE);
    gridPane27.setVgap(5.0);
    Label label21 = new Label();
    label21.setMaxHeight(Control.USE_COMPUTED_SIZE);
    label21.setMaxWidth(1.7976931348623157E308);
    label21.setMinHeight(Control.USE_COMPUTED_SIZE);
    label21.setMinWidth(100.0);
    label21.setPrefWidth(100.0);
    label21.setText(bundle.getString("GSSVendorSection_Desc"));
    label21.setWrapText(true);
    GridPane.setColumnIndex(label21, 0);
    GridPane.setHalignment(label21, HPos.LEFT);
    GridPane.setRowIndex(label21, 0);
    GridPane.setVgrow(label21, Priority.NEVER);
    gridPane27.getChildren().add(label21);
    controlVendor = new ComboBox();
    controlVendor.setMaxWidth(1.7976931348623157E308);
    controlVendor.setMinWidth(100.0);
    controlVendor.setPrefWidth(100.0);
    GridPane.setColumnIndex(controlVendor, 0);
    GridPane.setRowIndex(controlVendor, 1);
    gridPane27.getChildren().add(controlVendor);
    ColumnConstraints columnConstraints53 = new ColumnConstraints();
    columnConstraints53.setHgrow(Priority.SOMETIMES);
    columnConstraints53.setMaxWidth(1.7976931348623157E308);
    columnConstraints53.setMinWidth(100.0);
    columnConstraints53.setPrefWidth(200.0);
    gridPane27.getColumnConstraints().add(columnConstraints53);
    Insets insets27 = new Insets(10.0, 10.0, 10.0, 10.0);
    gridPane27.setPadding(insets27);
    RowConstraints rowConstraints50 = new RowConstraints();
    rowConstraints50.setMinHeight(Control.USE_PREF_SIZE);
    rowConstraints50.setVgrow(Priority.NEVER);
    gridPane27.getRowConstraints().add(rowConstraints50);
    RowConstraints rowConstraints51 = new RowConstraints();
    rowConstraints51.setMinHeight(Control.USE_PREF_SIZE);
    rowConstraints51.setVgrow(Priority.NEVER);
    gridPane27.getRowConstraints().add(rowConstraints51);
    titledPane10.setContent(gridPane27);
    anchorPane11.getChildren().add(titledPane10);
    initialize(null, bundle);
    return anchorPane11;
}
 
開發者ID:DigiArea,項目名稱:closurefx-builder,代碼行數:63,代碼來源:GSSVendorSectionController.java


注:本文中的javafx.scene.layout.RowConstraints.setMinHeight方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。