当前位置: 首页>>代码示例>>Java>>正文


Java ColumnConstraints.setMinWidth方法代码示例

本文整理汇总了Java中javafx.scene.layout.ColumnConstraints.setMinWidth方法的典型用法代码示例。如果您正苦于以下问题:Java ColumnConstraints.setMinWidth方法的具体用法?Java ColumnConstraints.setMinWidth怎么用?Java ColumnConstraints.setMinWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.layout.ColumnConstraints的用法示例。


在下文中一共展示了ColumnConstraints.setMinWidth方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadGridData

import javafx.scene.layout.ColumnConstraints; //导入方法依赖的package包/类
public static void loadGridData(GridPane grid,Main main, DescriptionEntretien d){
	// Grid initialisation ( reset )
	grid.getColumnConstraints().clear();
	// Grid Creation
	// for each moment of the interview we add a collumn
	for (int j = 0; j < d.getNumberCols(); j++) {
		ColumnConstraints c = new ColumnConstraints();
		c.setMinWidth(180);
		c.setPrefWidth(Control.USE_COMPUTED_SIZE);
		c.setMaxWidth(Control.USE_COMPUTED_SIZE);
		grid.getColumnConstraints().add(c);
	}
	
	for (int i = 0; i < 1; i++) {
		for (int j = 0; j < d.getNumberCols(); j++) {
			// Creation of the Moment box			
			MomentExpVBox mp = new MomentExpVBox(main);
			addMomentExpBorderPaneListener(mp, main);
			
			MomentExperience mom;
			boolean hasMoment = false;
			if (main.getCurrentDescription() != null) {
				for (MomentExperience m : d.getMoments()) {
					if(m.getGridCol() == j){
						mom = m;
						mp.setMoment(mom);
						hasMoment = true;
					}
				}
			}
			if (hasMoment) {
				mp.showMoment();
				mp.LoadMomentData();
				loadTypes(mp, main);
				loadSousMoment(mp,main);
			}				
			grid.add(mp,j,i);
		}
	}
}
 
开发者ID:coco35700,项目名称:uPMT,代码行数:41,代码来源:MainViewTransformations.java

示例2: execute

import javafx.scene.layout.ColumnConstraints; //导入方法依赖的package包/类
@Override
public void execute() {
	momentExpPane.showMoment();
	main.getCurrentDescription().addMomentExp(momentExpPane.getMoment());
	
	if(momentExpPane.getCol() == main.getCurrentDescription().getNumberCols()-1){
		MomentExpVBox mb = new MomentExpVBox(main, true);
		MainViewTransformations.addMomentExpBorderPaneListener(mb, main);
		ColumnConstraints c = new ColumnConstraints();
		c.setMinWidth(180);
		c.setPrefWidth(Control.USE_COMPUTED_SIZE);
		c.setMaxWidth(Control.USE_COMPUTED_SIZE);
		// add a new col and the borderPane
		main.getGrid().getColumnConstraints().add(c);
		main.getGrid().add(mb,main.getCurrentDescription().getNumberCols(), 0);
		// increase the number of col by one
		main.getCurrentDescription().setNumberCols(main.getCurrentDescription().getNumberCols()+1);
	}
	main.needToSave();
}
 
开发者ID:coco35700,项目名称:uPMT,代码行数:21,代码来源:AddMomentCommand.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: 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

示例5: FormPane

import javafx.scene.layout.ColumnConstraints; //导入方法依赖的package包/类
public FormPane(String styleClass, int columns) {
    this.columns = columns;
    getStyleClass().addAll("form-pane", styleClass);
    ColumnConstraints cc = new ColumnConstraints();
    cc.setMinWidth(Region.USE_PREF_SIZE);
    getColumnConstraints().add(cc);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:8,代码来源:FormPane.java

示例6: buildCells

import javafx.scene.layout.ColumnConstraints; //导入方法依赖的package包/类
private void buildCells() {
    positionToDateCellMap.clear();
    dateToPositionMap.clear();
    cellMap.clear();

    YearMonth start = getSkinnable().getExtendedStartMonth();
    YearMonth end = getSkinnable().getExtendedEndMonth();

    int colIndex = 0;

    grid.getColumnConstraints().clear();
    grid.getChildren().clear();

    while (!start.isAfter(end)) {
        ColumnConstraints columnConstraints = new ColumnConstraints();
        columnConstraints.setFillWidth(true);
        columnConstraints.setMinWidth(Region.USE_PREF_SIZE);
        columnConstraints.setMaxWidth(Double.MAX_VALUE);
        grid.getColumnConstraints().add(columnConstraints);

        buildCells(start, colIndex);

        start = start.plusMonths(1);
        colIndex++;
    }

    grid.getColumnConstraints().forEach(con -> con.setPercentWidth(100d / (double) grid.getColumnConstraints().size()));

    updateEntries("cells were rebuild");
    updateToday();
    updateSelected();
}
 
开发者ID:dlemmermann,项目名称:CalendarFX,代码行数:33,代码来源:MonthSheetViewSkin.java

示例7: updateVisibility

import javafx.scene.layout.ColumnConstraints; //导入方法依赖的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

示例8: YearViewSkin

import javafx.scene.layout.ColumnConstraints; //导入方法依赖的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

示例9: createContent

import javafx.scene.layout.ColumnConstraints; //导入方法依赖的package包/类
@Override
protected Node createContent() {
    leftSide = createLeftHandSide();
    rightSide = createRightHandSide();

    leftColumn = new ColumnConstraints();
    leftColumn.setPercentWidth(50);
    leftColumn.setMinWidth(Region.USE_COMPUTED_SIZE);
    leftColumn.setPrefWidth(Region.USE_COMPUTED_SIZE);
    leftColumn.setMaxWidth(Double.MAX_VALUE);
    leftColumn.setFillWidth(true);

    rightColumn = new ColumnConstraints();
    rightColumn.setPercentWidth(50);
    rightColumn.setMinWidth(Region.USE_COMPUTED_SIZE);
    rightColumn.setPrefWidth(Region.USE_COMPUTED_SIZE);
    rightColumn.setMaxWidth(Double.MAX_VALUE);
    rightColumn.setFillWidth(true);

    RowConstraints rowConstraints = new RowConstraints();
    rowConstraints.setPercentHeight(100);
    rowConstraints.setFillHeight(true);

    // no need to assign a style class, will be auto-assigned by superclass ("content")
    gridPane = new GridPane();
    gridPane.setHgap(20);
    gridPane.getColumnConstraints().addAll(leftColumn, rightColumn);
    gridPane.getRowConstraints().addAll(rowConstraints);

    gridPane.add(leftSide, 0, 0);
    gridPane.add(rightSide, 1, 0);

    getSkinnable().widthProperty().addListener(it -> updateLayout());

    return gridPane;
}
 
开发者ID:dlemmermann,项目名称:CalendarFX,代码行数:37,代码来源:DayPageSkin.java

示例10: newColumn

import javafx.scene.layout.ColumnConstraints; //导入方法依赖的package包/类
public static ColumnConstraints newColumn(int value, String unit, HPos position) {
  ColumnConstraints col = new ColumnConstraints();
  if (unit.equals("%")) {
    col.setPercentWidth(value);
  }
  if (unit.equals("px")) {
    col.setMaxWidth(value);
    col.setMinWidth(value);
  }

  if (position != null) {
    col.setHalignment(position);
  }
  return col;
}
 
开发者ID:yarl,项目名称:pattypan,代码行数:16,代码来源:Util.java

示例11: initializeEditorCanvas

import javafx.scene.layout.ColumnConstraints; //导入方法依赖的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

示例12: JobProgressTreeNode

import javafx.scene.layout.ColumnConstraints; //导入方法依赖的package包/类
/**
 * Constructs a new {@link JobProgressTreeNode}.
 * @param job the {@link JenkinsJob} associated.
 * @param styling the {@link JavaFxStyle} for styling components.
 */
JobProgressTreeNode( JenkinsJob job, JavaFxStyle styling ) {
   this.job = job;
   add( jobName = styling.createBoldLabel( job.nameProperty().get() ), 0, 0 );
   add( jobProgress = new BorderPane( new JobProgressImpl( job, new BuildWallThemeImpl( "Default" ) ) ), 1, 0 );
   
   ColumnConstraints constraintA = new ColumnConstraints();
   constraintA.setPercentWidth( NAME_PROPORTION );
   constraintA.setMinWidth( MINIMUM_JOB_NAME_WIDTH );
   ColumnConstraints constraintB = new ColumnConstraints();
   constraintB.setPercentWidth( PROGRESS_PROPORTION );
   getColumnConstraints().addAll( constraintA, constraintB );
}
 
开发者ID:DanGrew,项目名称:JttDesktop,代码行数:18,代码来源:JobProgressTreeNode.java

示例13: loadClientProfile

import javafx.scene.layout.ColumnConstraints; //导入方法依赖的package包/类
private void loadClientProfile() {
    // preliminary values
    final double width = avatarImage.getFitWidth();
    final double height = avatarImage.getFitHeight();
    final String user = client().getUserData().getUserName();
    final String status = client().getUserData().getStatus();
    final String about = client().getUserData().getAboutMe();
    final Image avatar = client().getUserData().getAvatar(width, height);

    // display all data
    userName.setText(user + " ");
    statusText.setText(status + " ");
    aboutMe.setText(about + " ");
    avatarImage.setImage(avatar);

    // make things appear
    ColumnConstraints cc = aboutGridPane.getColumnConstraints().get(1);
    cc.setMinWidth(initialGridWidth);
    cc.setMaxWidth(initialGridWidth);
    messageButton.setVisible(true);
    videoCallButton.setVisible(true);

    // set edit states of each controls
    aboutMe.setEditable(false);
    userName.setEditable(false);
    statusText.setEditable(false);

    userName.setCursor(Cursor.DEFAULT);
    statusText.setCursor(Cursor.DEFAULT);
    aboutMe.setCursor(Cursor.DEFAULT);

    userName.setId("user-name");
    statusText.setId("user-status");
    aboutMe.setId("user-about");
}
 
开发者ID:dipu-bd,项目名称:Tuntuni,代码行数:36,代码来源:ProfileController.java

示例14: loadDefaultProfile

import javafx.scene.layout.ColumnConstraints; //导入方法依赖的package包/类
private void loadDefaultProfile() {
    // preliminary values
    final double width = avatarImage.getFitWidth();
    final double height = avatarImage.getFitHeight();
    final String user = Core.instance().user().getName();
    final String status = Core.instance().user().getStatus();
    final String about = Core.instance().user().getAboutMe();
    final Image avatar = Core.instance().user().getAvatarImage(width, height);

    // display all data
    userName.setText(user);
    statusText.setText(status);
    aboutMe.setText(about);
    avatarImage.setImage(avatar);

    // make things appear
    ColumnConstraints cc = aboutGridPane.getColumnConstraints().get(1);
    cc.setMinWidth(0);
    cc.setMaxWidth(0);
    messageButton.setVisible(false);
    videoCallButton.setVisible(false);

    // set edit states of each controls
    aboutMe.setEditable(true);
    userName.setEditable(true);
    statusText.setEditable(true);

    userName.setCursor(Cursor.TEXT);
    statusText.setCursor(Cursor.TEXT);
    aboutMe.setCursor(Cursor.TEXT);

    userName.setId("my-name");
    statusText.setId("my-status");
    aboutMe.setId("my-about");
}
 
开发者ID:dipu-bd,项目名称:Tuntuni,代码行数:36,代码来源:ProfileController.java

示例15: drawColumn

import javafx.scene.layout.ColumnConstraints; //导入方法依赖的package包/类
public void drawColumn() {
		
		// Remove any previous constraints
		columnGridPane.getRowConstraints().clear();
		columnGridPane.getColumnConstraints().clear();
		
		// Set the column Constraints
		ColumnConstraints col0 = new ColumnConstraints();
		col0.setMinWidth(5);
		col0.setPrefWidth(Control.USE_COMPUTED_SIZE);
		col0.setMaxWidth(Control.USE_COMPUTED_SIZE);
		col0.setFillWidth(true);
		col0.setHgrow(Priority.ALWAYS);
		this.columnGridPane.getColumnConstraints().add(col0);

		
		// Add the Y-Axis
//		this.yAxisCenterStackPane.getChildren().add(axisCenter);
//		this.axisCenterAnchorPane.widthProperty().addListener( stageSizeListener );
//		this.axisCenterAnchorPane.heightProperty().addListener( stageSizeListener );
				
		// Now add the X-Axis
		axisLeftStackPane.getChildren().add(axisLeft);
		this.axisLeftAnchorPane.widthProperty().addListener( stageSizeListener );
		this.axisLeftAnchorPane.heightProperty().addListener( stageSizeListener );

		
		axisCenterStackPane.getChildren().add(axisCenter);
		this.axisCenterAnchorPane.widthProperty().addListener( stageSizeListener );
		this.axisCenterAnchorPane.heightProperty().addListener( stageSizeListener );
		
		axisRightStackPane.getChildren().add(axisRight);
		this.axisRightAnchorPane.widthProperty().addListener( stageSizeListener );
		this.axisRightAnchorPane.heightProperty().addListener( stageSizeListener );
		
		
	}
 
开发者ID:drivenbyentropy,项目名称:aptasuite,代码行数:38,代码来源:YAxisController.java


注:本文中的javafx.scene.layout.ColumnConstraints.setMinWidth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。