本文整理汇总了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();
}
示例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);
}
示例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));
}
}
示例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);
}