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


Java ColumnConstraints.setHgrow方法代碼示例

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


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

示例1: EventLogger

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
public EventLogger() {
    setVisible(false);
    setPrefHeight(30);
    setPrefWidth(612);

    ColumnConstraints column1 = new ColumnConstraints();
    column1.setPercentWidth(85);
    column1.setHgrow(Priority.SOMETIMES);

    ColumnConstraints column2 = new ColumnConstraints();
    column2.setPercentWidth(15);
    column2.setHgrow(Priority.SOMETIMES);

    getColumnConstraints().clear();
    getColumnConstraints().addAll(column1, column2);

    RowConstraints row = new RowConstraints(10, 40, 40);
    row.setVgrow(Priority.SOMETIMES);

    getRowConstraints().clear();
    getRowConstraints().add(row);

    eventLabel = buildEventLabel();
    setConstraints(eventLabel, 0, 0);
    GridPane.setMargin(eventLabel, new Insets(0, 10, 0, 10));

    serverLabel = new Label();
    setConstraints(serverLabel, 1, 0);
    GridPane.setMargin(serverLabel, new Insets(0, 10, 0, 10));
    getChildren().addAll(eventLabel, serverLabel);
}
 
開發者ID:Kindrat,項目名稱:cassandra-client,代碼行數:32,代碼來源:EventLogger.java

示例2: createGrid

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
private GridPane createGrid() {
	//-------------------------------------------------------------------- Grid
	GRID.setHgap(GRID_GAP);
	GRID.setVgap(GRID_GAP);
	GRID.setPadding(new Insets(GRID_GAP));
	GRID.setGridLinesVisible(false);
	//-------------------------------------------------------------------- Constraints
	for (int i = 0; i < 2; i++) {
		final ColumnConstraints column = new ColumnConstraints();
		column.setFillWidth(true);
		column.setHgrow(Priority.NEVER);
		GRID.getColumnConstraints().add(column);
	}
	GRID.getColumnConstraints().get(1).setHgrow(Priority.SOMETIMES);
	//-------------------------------------------------------------------- End
	return GRID;
}
 
開發者ID:mikelaud,項目名稱:fx-dialogs,代碼行數:18,代碼來源:FxDialog.java

示例3: createBody

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
/**
 * Creates the node used for the body part of each cell.
 *
 * In this default implementation the body consists of a grid pane with
 * three columns. The middle column is used for showing the title of
 * calendar entries. This column will get whatever space is left after
 * the icon and the time column have used what they need. This means
 * that a very long title will automatically be truncated.
 *
 * @return the body node
 */
protected Node createBody() {
    // icon column
    ColumnConstraints iconColumn = new ColumnConstraints();

    // title column
    ColumnConstraints descriptionColumn = new ColumnConstraints();
    descriptionColumn.setFillWidth(true);
    descriptionColumn.setHgrow(Priority.SOMETIMES);
    descriptionColumn.setMinWidth(0);
    descriptionColumn.setPrefWidth(0);

    // time column
    ColumnConstraints timeColumn = new ColumnConstraints();
    timeColumn.setHalignment(HPos.RIGHT);

    gridPane = new GridPane();
    gridPane.setGridLinesVisible(true);
    gridPane.setMinWidth(0);
    gridPane.setPrefWidth(0);
    gridPane.getStyleClass().add(AGENDA_VIEW_BODY);
    gridPane.getColumnConstraints().addAll(iconColumn, descriptionColumn, timeColumn);

    return gridPane;
}
 
開發者ID:dlemmermann,項目名稱:CalendarFX,代碼行數:36,代碼來源:AgendaView.java

示例4: initializeGrid

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
private void initializeGrid() {
	grid = new GridPane();
	//grid.setAlignment(Pos.CENTER);
	grid.setHgap(10);
	grid.setVgap(10);
	grid.setPadding(new Insets(25, 25, 25, 25));
	grid.setMaxSize(Region.USE_COMPUTED_SIZE, Region.USE_COMPUTED_SIZE);
	ColumnConstraints c1 = new ColumnConstraints();
	c1.setFillWidth(true);
	c1.setHgrow(Priority.ALWAYS);
	grid.getColumnConstraints().addAll(new ColumnConstraints(), c1, new ColumnConstraints());
	RowConstraints r2 = new RowConstraints();
	r2.setFillHeight(true);
	r2.setVgrow(Priority.ALWAYS);
}
 
開發者ID:joakimkistowski,項目名稱:HTTP-Load-Generator,代碼行數:16,代碼來源:ScriptTestWindow.java

示例5: BuildWallConfigurationPanelImpl

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
/**
 * Constructs a new {@link BuildWallConfigurationPanelImpl}.
 * @param configuration the {@link BuildWallConfiguration} to configure.
 * @param title the title of the panel.
 */
public BuildWallConfigurationPanelImpl( String title, BuildWallConfiguration configuration ) {
   this.configuration = configuration;
   this.styling = new JavaFxStyle();
   
   constructTitle( title );
   constructDimensions();
   constructJobPoliciesPane();
   constructFontItemPane();
   constructColourItemPane();
   
   ColumnConstraints width = new ColumnConstraints();
   width.setPercentWidth( 100 );
   width.setHgrow( Priority.ALWAYS );
   getColumnConstraints().addAll( width );
}
 
開發者ID:DanGrew,項目名稱:JttDesktop,代碼行數:21,代碼來源:BuildWallConfigurationPanelImpl.java

示例6: configureGrid

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
private void configureGrid() {
    grid.setHgap(10);
    grid.setVgap(4);
    grid.setPadding(new Insets(0, 10, 0, 10));

    ColumnConstraints column1 = new ColumnConstraints(32);
    ColumnConstraints column2 = new ColumnConstraints(USE_COMPUTED_SIZE , USE_COMPUTED_SIZE, Double.MAX_VALUE);
    column2.setHgrow(Priority.NEVER);
    ColumnConstraints column3 = new ColumnConstraints(30 , 50 , Double.MAX_VALUE);
    column3.setHgrow(Priority.ALWAYS);
    column3.setFillWidth(true);
    ColumnConstraints column4 = new ColumnConstraints(USE_COMPUTED_SIZE , USE_COMPUTED_SIZE , Double.MAX_VALUE);
    column4.setHgrow(Priority.NEVER);
    ColumnConstraints column5 = new ColumnConstraints(30 , 50 , Double.MAX_VALUE);
    column5.setHgrow(Priority.ALWAYS);
    column5.setFillWidth(true);
    ColumnConstraints column6 = new ColumnConstraints(10, 12, 16);
    column6.setHgrow(Priority.NEVER);
    column6.setFillWidth(false);
    grid.getColumnConstraints().addAll(column1, column2, column3, column4, column5, column6);
}
 
開發者ID:frosch95,項目名稱:GeoFroggerFX,代碼行數:22,代碼來源:CacheListCell.java

示例7: createPane

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
@Override
public void createPane() {
    this.setHgap(10);
    this.setVgap(10);

    ColumnConstraints firstColumnConstrains = new ColumnConstraints();
    ColumnConstraints secondColumnConstrains = new ColumnConstraints();
    firstColumnConstrains.setPercentWidth(FIRST_COLUMN_PERCENT_WIDTH);
    secondColumnConstrains.setPercentWidth(SECOND_COLUMN_PERCENT_WIDTH);
    secondColumnConstrains.setHgrow(Priority.ALWAYS);
    this.getColumnConstraints().addAll(firstColumnConstrains, secondColumnConstrains);

    this.addRow(0, projectNameLabel, projectNameField);
    this.addRow(1, projectPathLabel, new HBox(projectPathField, pathChooserButton));
    this.addRow(2, startDateLabel, startDatePicker);
    this.addRow(3, finishDateLabel, finishDatePicker);
    this.addRow(4, descriptionLabel, descriptionTextArea);

    HBox.setHgrow(projectPathField, Priority.ALWAYS);
    GridPane.setMargin(descriptionTextArea, new Insets(0, 0, 10, 0));
    GridPane.setValignment(descriptionLabel, VPos.TOP);

    startDatePicker.setPrefWidth(350);
    finishDatePicker.setPrefWidth(350);
    descriptionTextArea.setPrefHeight(200);
}
 
開發者ID:khasang,項目名稱:Cachoeira,代碼行數:27,代碼來源:FieldsPane.java

示例8: createPane

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
@Override
public void createPane() {
    ColumnConstraints firstColumnConstrains = new ColumnConstraints();
    ColumnConstraints secondColumnConstrains = new ColumnConstraints();
    firstColumnConstrains.setPercentWidth(FIRST_COLUMN_PERCENT_WIDTH);
    secondColumnConstrains.setPercentWidth(SECOND_COLUMN_PERCENT_WIDTH);
    secondColumnConstrains.setHgrow(Priority.ALWAYS);

    this.getColumnConstraints().addAll(firstColumnConstrains, secondColumnConstrains);
    this.addRow(0, nameLabel, nameField);
    this.addRow(1, startDateLabel, startDatePicker);
    this.addRow(2, finishDateLabel, finishDatePicker);
    this.addRow(3, donePercentLabel, donePercentSlider);
    this.addRow(4, costLabel, costField);
    this.addRow(5, descriptionLabel, descriptionTextArea);

    this.setVgap(10);
    this.setHgap(10);
    this.setPadding(new Insets(10));

    startDatePicker.setPrefWidth(350);
    finishDatePicker.setPrefWidth(350);
    GridPane.setValignment(descriptionLabel, VPos.TOP);
}
 
開發者ID:khasang,項目名稱:Cachoeira,代碼行數:25,代碼來源:TaskInformation.java

示例9: createPane

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
@Override
public void createPane() {
    ColumnConstraints firstColumnConstrains = new ColumnConstraints();
    ColumnConstraints secondColumnConstrains = new ColumnConstraints();
    firstColumnConstrains.setPercentWidth(FIRST_COLUMN_PERCENT_WIDTH);
    secondColumnConstrains.setPercentWidth(SECOND_COLUMN_PERCENT_WIDTH);
    secondColumnConstrains.setHgrow(Priority.ALWAYS);

    this.getColumnConstraints().addAll(firstColumnConstrains, secondColumnConstrains);
    this.addRow(0, nameLabel, nameField);
    this.addRow(1, emailLabel, emailField);
    this.addRow(2, resourceTypeLabel, resourceTypeComboBox);
    this.addRow(3, descriptionLabel, descriptionTextArea);

    this.setVgap(10);
    this.setHgap(10);
    this.setPadding(new Insets(10));

    emailField.setPrefWidth(350);
    resourceTypeComboBox.setPrefWidth(350);
    GridPane.setValignment(descriptionLabel, VPos.TOP);
}
 
開發者ID:khasang,項目名稱:Cachoeira,代碼行數:23,代碼來源:ResourceInformation.java

示例10: createPane

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
@Override
public void createPane() {
    ColumnConstraints firstColumnConstrains = new ColumnConstraints();
    ColumnConstraints secondColumnConstrains = new ColumnConstraints();
    firstColumnConstrains.setPercentWidth(FIRST_COLUMN_PERCENT_WIDTH);
    secondColumnConstrains.setPercentWidth(SECOND_COLUMN_PERCENT_WIDTH);
    secondColumnConstrains.setHgrow(Priority.ALWAYS);

    this.getColumnConstraints().addAll(firstColumnConstrains, secondColumnConstrains);
    this.addRow(0, nameLabel, nameField);
    this.addRow(1, startDateLabel, startDatePicker);
    this.addRow(2, finishDateLabel, finishDatePicker);
    this.addRow(3, descriptionLabel, descriptionTextArea);

    this.setVgap(10);
    this.setHgap(10);
    this.setPadding(new Insets(10));

    startDatePicker.setPrefWidth(350);
    finishDatePicker.setPrefWidth(350);
    GridPane.setValignment(descriptionLabel, VPos.TOP);
}
 
開發者ID:khasang,項目名稱:Cachoeira,代碼行數:23,代碼來源:ProjectInformation.java

示例11: buildQueueSettingsPane

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
private Node buildQueueSettingsPane() {		
	final GridPane queueSettingsPane = new GridPane();
	
	queueSettingsPane.add(new Label("Maximum number of active torrents (upload or download): "), 0, 0);
	queueSettingsPane.add(activeTorrentsLimitField, 1, 0);
	queueSettingsPane.add(new Label("Maximum number of active downloads: "), 0, 1);
	queueSettingsPane.add(activeDownloadsLimitField, 1, 1);
	queueSettingsPane.add(new Label("Maximum number of active uploads: "), 0, 2);
	queueSettingsPane.add(activeUploadsLimitField, 1, 2);
	
	final ColumnConstraints firstColumn = new ColumnConstraints();
	firstColumn.setHgrow(Priority.ALWAYS);
	
	final ColumnConstraints secondColumn = new ColumnConstraints();		
	secondColumn.setPrefWidth(60);
       secondColumn.setMinWidth(60);
	
	queueSettingsPane.getColumnConstraints().addAll(firstColumn, secondColumn);
	queueSettingsPane.setVgap(5);
	
	return queueSettingsPane;
}
 
開發者ID:veroslav,項目名稱:jfx-torrent,代碼行數:23,代碼來源:QueueingContentPane.java

示例12: addTab

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
/**
 * Adds a tab to the GUI with the specified gridpane information and title.
 * @param gridColumns
 * @param gridRows
 * @param name
 * @return
 */
public Tab addTab(int gridRows, int gridColumns, String name) {
	TimerTab tab = new TimerTab(name);
	tab.setClosable(false);
	GridPane gp = new GridPane();
	gp.setHgap(8);
	gp.setVgap(8);
	gp.getStyleClass().add("gridPane");
	
	for (int i = 0; i < gridColumns; i++) {
		ColumnConstraints cc = new ColumnConstraints();
		cc.setHgrow(Priority.ALWAYS);
		gp.getColumnConstraints().add(cc);
	}
	for (int i = 0; i < gridRows; i++) {
		RowConstraints rc = new RowConstraints();
		rc.setVgrow(Priority.NEVER);
		gp.getRowConstraints().add(rc);
	}
	
	tab.setContent(gp);
	tabPane.getTabs().add(tab);
	gp.getChildren().clear();
	return tab;
}
 
開發者ID:Talkarcabbage,項目名稱:rs-timer,代碼行數:32,代碼來源:MainWindow.java

示例13: addDefaultTab

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
public Tab addDefaultTab() {
	TimerTab tab = new TimerTab(ConfigManager.getInstance().getDefaultTabName());
	tab.setClosable(false);
	GridPane gp = new GridPane();
	gp.setHgap(8);
	gp.setVgap(8);
	gp.getStyleClass().add("gridPane");
	
	for (int i = 0; i < ConfigManager.getInstance().getDefaultTabColumns(); i++) {
		ColumnConstraints cc = new ColumnConstraints();
		cc.setHgrow(Priority.ALWAYS);
		gp.getColumnConstraints().add(cc);
	}
	for (int i = 0; i < ConfigManager.getInstance().getDefaultTabRows(); i++) {
		RowConstraints rc = new RowConstraints();
		rc.setVgrow(Priority.NEVER);
		gp.getRowConstraints().add(rc);
	}
	
	tab.setContent(gp);
	tabPane.getTabs().add(tab);
	gp.getChildren().clear();
	return tab;
}
 
開發者ID:Talkarcabbage,項目名稱:rs-timer,代碼行數:25,代碼來源:MainWindow.java

示例14: setConstraints

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
/**
 * Sets the FX constraints.
 */
private void setConstraints() {

  // Column 1 has empty constraints.
  this.getColumnConstraints().add(new ColumnConstraints());

  // Column 2 should grow to fill space.
  ColumnConstraints column2 = new ColumnConstraints();
  column2.setHgrow(Priority.ALWAYS);
  this.getColumnConstraints().add(column2);

  // Rows 1-4 have empty constraints.
  this.getRowConstraints().add(new RowConstraints());
  this.getRowConstraints().add(new RowConstraints());
  this.getRowConstraints().add(new RowConstraints());
  this.getRowConstraints().add(new RowConstraints());

  // Row 5 should
  RowConstraints row5 = new RowConstraints();
  row5.setVgrow(Priority.ALWAYS);
  this.getRowConstraints().add(row5);
}
 
開發者ID:Apelon-VA,項目名稱:ISAAC,代碼行數:25,代碼來源:ImportView.java

示例15: initializeGrid

import javafx.scene.layout.ColumnConstraints; //導入方法依賴的package包/類
private void initializeGrid() {
	grid.setHgap(10);
	grid.setVgap(5);
	grid.setPadding(new Insets(0, 10, 0, 10));

	// icon column
	ColumnConstraints col1 = new ColumnConstraints();
	col1.setFillWidth(false);
	col1.setHgrow(Priority.NEVER);
	grid.getColumnConstraints().add(col1);

	// title column: grows
	ColumnConstraints col2 = new ColumnConstraints();
	col2.setFillWidth(true);
	col2.setHgrow(Priority.ALWAYS);
	grid.getColumnConstraints().add(col2);

	// date column
	ColumnConstraints col3 = new ColumnConstraints();
	col3.setFillWidth(false);
	col3.setHgrow(Priority.NEVER);
	grid.getColumnConstraints().add(col3);
}
 
開發者ID:PeerWasp,項目名稱:PeerWasp,代碼行數:24,代碼來源:ActivityItemCell.java


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