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


Java VBox.setMaxSize方法代码示例

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


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

示例1: start

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public void start(Stage stage) throws Exception {
    Parent pane = root.get();

    double width = size.width;
    double height = size.height;

    VBox box = new VBox(pane);
    VBox.setVgrow(pane, ALWAYS);
    box.setMinSize(width, height);
    box.setPrefSize(width, height);
    box.setMaxSize(width, height);

    box.setBackground(new Background(new BackgroundFill(fill, null, null)));

    ScrollPane scroll = new ScrollPane(box);
    Scene scene = new Scene(scroll);

    stage.setScene(scene);
    stage.show();
}
 
开发者ID:testing-av,项目名称:testing-video,代码行数:22,代码来源:FxDisplay.java

示例2: AreaChartControl

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
public AreaChartControl(String name) {
	super(name, FlashboardSendableType.AREACHART);
	
	axisX = new NumberAxis();
	axisX.setForceZeroInRange(false);
	axisX.setAutoRanging(false);
	axisX.setUpperBound(maxX);
	axisX.setLowerBound(minX);
	axisY = new NumberAxis();
	axisY.setForceZeroInRange(false);
	axisY.setAutoRanging(false);
	axisY.setUpperBound(maxY);
	axisY.setLowerBound(minY);
	
	chart = new AreaChart<Number, Number>(axisX, axisY);
	chart.setLegendVisible(false);
	chart.setAnimated(false);
	
	chartSeries = new AreaChart.Series<Number, Number>();
	chart.setTitle(name);
	chart.getData().add(chartSeries);
	
	root = new VBox();
	root.setAlignment(Pos.CENTER);
	root.setMaxSize(WIDTH, HEIGHT);
	root.getChildren().add(chart);
}
 
开发者ID:Flash3388,项目名称:FlashLib,代码行数:28,代码来源:AreaChartControl.java

示例3: BarChartControl

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
public BarChartControl(String name) {
	super(name, FlashboardSendableType.BARCHART);
	
	axisX = new CategoryAxis();
	axisX.setAutoRanging(true);
	axisY = new NumberAxis();
	axisY.setForceZeroInRange(false);
	axisY.setAutoRanging(false);
	axisY.setUpperBound(maxY);
	axisY.setLowerBound(minY);
	
	chart = new BarChart<String, Number>(axisX, axisY);
	chart.setLegendVisible(false);
	chart.setAnimated(false);
	
	chartSeries = new BarChart.Series<String, Number>();
	chart.setTitle(name);
	chart.getData().add(chartSeries);
	
	root = new VBox();
	root.setAlignment(Pos.CENTER);
	root.setMaxSize(WIDTH, HEIGHT);
	root.getChildren().add(chart);
	
	
	charts.put(name, this);
	List<BarChartSeriesControl> controls = unallocatedControls.get(name);
	if(unallocatedControls != null){
		unallocatedControls.remove(name);
		for (int i = 0; i < unallocatedControls.size(); i++)
			addControl(controls.get(i));
	}
}
 
开发者ID:Flash3388,项目名称:FlashLib,代码行数:34,代码来源:BarChartControl.java

示例4: LineChartControl

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
public LineChartControl(String name) {
	super(name, FlashboardSendableType.LINECHART);
	
	axisX = new NumberAxis();
	axisX.setForceZeroInRange(false);
	axisX.setAutoRanging(false);
	axisX.setUpperBound(maxX);
	axisX.setLowerBound(minX);
	axisY = new NumberAxis();
	axisY.setForceZeroInRange(false);
	axisY.setAutoRanging(false);
	axisY.setUpperBound(maxY);
	axisY.setLowerBound(minY);
	
	chart = new LineChart<Number, Number>(axisX, axisY);
	chart.setLegendVisible(false);
	chart.setAnimated(false);
	
	chartSeries = new LineChart.Series<Number, Number>();
	chart.setTitle(name);
	chart.getData().add(chartSeries);
	
	root = new VBox();
	root.setAlignment(Pos.CENTER);
	root.setMaxSize(WIDTH, HEIGHT);
	root.getChildren().add(chart);
}
 
开发者ID:Flash3388,项目名称:FlashLib,代码行数:28,代码来源:LineChartControl.java


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