當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。