本文整理匯總了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);
}