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


Java VBox.setMinHeight方法代码示例

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


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

示例1: createVerticalBox

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
public static VBox createVerticalBox(double width, double height)
{
	VBox box = new VBox();
	box.setMinWidth(width);
	box.setMaxWidth(width);
	box.setMinHeight(height);
	box.setMaxHeight(height);
	return box;
}
 
开发者ID:PolyphasicDevTeam,项目名称:NoMoreOversleeps,代码行数:10,代码来源:JavaFxHelper.java

示例2: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer() {
	webContent.loadContent("<html><body><b>Missing a manual</b></body></html>");
	try {
		// To avoid strange chars like "", the html -Tag is added here separately:
		webContent.loadContent("<html>"+Functions.fileToString(new File(
							   "src/views/txt/impressum.htm"))+"</html>");
	} catch (Exception e) {
		e.printStackTrace();
	}
	double pageWidth = this.getFXController().getMyFXStage().getOPTIMAL_WIDTH();
	double pageHeight = this.getFXController().getMyFXStage().getOPTIMAL_HEIGHT();
	debug.Debugger.out("ImpressumView sizes: w:"+pageWidth+" h:"+pageHeight);
	
	//webPage.setPrefHeight(pageHeight);
	//webContent.setJavaScriptEnabled(true);
	webPage.setPrefWidth(pageWidth*.93);
	webPage.applyCss();

	Label labelTitel = new Label("Impressum");
	labelTitel.setId("impressumtitel");

	AppButton backBtn = new AppButton("_Zur�ck");
	backBtn.setOnAction(e -> getFXController().showMainView());

	BorderPane headLayout = new BorderPane(labelTitel);
	headLayout.setPadding(new Insets(20));
		
	//Info: Die Links sind nun im Controlllayout damit sie mit dem
	//Zur�ckButton auf einer H�he sind.
	Hyperlink WISSlink = new Hyperlink("WISS Webseite");
	WISSlink.setOnAction(e -> Functions.openWebpage("http://www.wiss.ch/"));	
	Hyperlink BITLink = new Hyperlink("BIT Webseite");
	BITLink.setOnAction(e -> Functions.openWebpage("https://www.bit.admin.ch/"));		
	Hyperlink LehrlingeLink = new Hyperlink("Unsere Webseite");
	LehrlingeLink.setOnAction(e -> Functions.openWebpage("http://bund2015.wiss-bern.ch/"));

	WISSlink.setId("LinkiD");
	BITLink.setId("LinkiD");
	LehrlingeLink.setId("LinkiD");
	
	//ScrollPane scroller = new ScrollPane();
	//scroller.setMaxWidth(800);
	//scroller.setHbarPolicy(ScrollBarPolicy.NEVER);
	//scroller.setVbarPolicy(ScrollBarPolicy.ALWAYS);
	//scroller.setContent(contentLayout);
	
	//Contentlayout beinhaltet webpage
	VBox contentLayout = new VBox(20);
	contentLayout.setMinHeight(pageHeight*0.6);
	contentLayout.setPrefWidth(pageWidth*.93);		
	contentLayout.getChildren().addAll(webPage);
	
	//F�r die ControllButtons und die Links
	ControlLayout conLay = new ControlLayout(backBtn,WISSlink, BITLink, LehrlingeLink);
	
	MainLayout maLay = new MainLayout(contentLayout, headLayout, conLay);

	return maLay;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:61,代码来源:ImpressumView.java

示例3: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer() {

	webContent.loadContent("<html><body><b>Missing a manual</b></body></html>");
	try {
		// To avoid strange chars like "", the html -Tag is added here separately:
		webContent.loadContent("<html>"+Functions.fileToString(new File(
							   "src/views/txt/anleitung.htm"))+"</html>");
	} catch (Exception e) {
		e.printStackTrace();
	}
	double pageWidth = this.getFXController().getMyFXStage().getOPTIMAL_WIDTH();
	double pageHeight = this.getFXController().getMyFXStage().getOPTIMAL_HEIGHT();
	debug.Debugger.out("ManualView sizes: w:"+pageWidth+" h:"+pageHeight);
	
	
	//webPage.setPrefHeight(pageHeight);
	//webContent.setJavaScriptEnabled(true);
	webPage.setPrefWidth(pageWidth*.93);
	webPage.applyCss();
	webPage.setId("anleitung");

	Label labelTitel = new Label("Anleitung");
	labelTitel.setId("anleitungstitel");

	BackButton backBtn = new BackButton(this.getFXController());

	BorderPane headLayout = new BorderPane(labelTitel);
	headLayout.setPadding(new Insets(5));

	//ScrollPane scroller = new ScrollPane();
	//scroller.setMaxWidth(800);
	//scroller.setHbarPolicy(ScrollBarPolicy.NEVER);
	//scroller.setVbarPolicy(ScrollBarPolicy.ALWAYS);
	//scroller.setContent(contentLayout);
	
	VBox contentLayout = new VBox(0);
	contentLayout.getChildren().addAll(webPage);
	contentLayout.setMinHeight(pageHeight*0.6);
	contentLayout.setPrefWidth(pageWidth*.93);		
	
	HBox controlLayout = new HBox(5);
	controlLayout.setAlignment(Pos.BOTTOM_CENTER);
	controlLayout.getChildren().addAll(backBtn);
	controlLayout.setPadding(new Insets(10));

	BorderPane mainLayout = new BorderPane();
	mainLayout.setPadding(new Insets(25));
	mainLayout.setTop(headLayout);
	mainLayout.setCenter(contentLayout);
	mainLayout.setBottom(controlLayout);
	
	return mainLayout;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:55,代码来源:ManualView.java

示例4: constructContainer

import javafx.scene.layout.VBox; //导入方法依赖的package包/类
@Override
public Parent constructContainer() {
	webContent.loadContent("<html><body><b>Missing a manual</b></body></html>");
	try {
		// To avoid strange chars like "", the html -Tag is added here separately:
		webContent.loadContent("<html>"+Functions.fileToString(new File(
							   "src/views/txt/quizlet.htm"))+"</html>");
	} catch (Exception e) {
		e.printStackTrace();
	}
	double pageWidth = this.getFXController().getMyFXStage().getOPTIMAL_WIDTH();
	double pageHeight = this.getFXController().getMyFXStage().getOPTIMAL_HEIGHT();
	debug.Debugger.out("QuizletView sizes: w:"+pageWidth+" h:"+pageHeight);
	
	//webContent.setJavaScriptEnabled(true);
	webPage.setPrefHeight(pageHeight);
	webPage.setPrefWidth(pageWidth*.93);
	webPage.applyCss();		
	
	Label labelTitel = new Label("Quizlet");
	labelTitel.setId("impressumtitel");

	AppButton backBtn = new AppButton("_Zur�ck");
	backBtn.setOnAction(e -> getFXController().showMainView());

	BorderPane headLayout = new BorderPane(labelTitel);
	headLayout.setPadding(new Insets(5));

	//ScrollPane scroller = new ScrollPane();
	//scroller.setMaxWidth(800);
	//scroller.setHbarPolicy(ScrollBarPolicy.NEVER);
	//scroller.setVbarPolicy(ScrollBarPolicy.ALWAYS);
	//scroller.setContent(contentLayout);
		
	Hyperlink QuizletLink = new Hyperlink("Quizlet");
	QuizletLink.setOnAction(e -> Functions.openWebpage("http://quizlet.com/"));
	QuizletLink.setId("LinkiD");
	
	VBox contentLayout = new VBox(0);
	contentLayout.getChildren().addAll(webPage);
	contentLayout.setMinHeight(pageHeight*0.6);
	contentLayout.setPrefWidth(pageWidth*.93);		
	
	HBox controlLayout = new HBox(5);
	controlLayout.setAlignment(Pos.BOTTOM_CENTER);
	controlLayout.getChildren().addAll(backBtn,QuizletLink);
	controlLayout.setPadding(new Insets(5));

	BorderPane mainLayout = new BorderPane();
	mainLayout.setPadding(new Insets(20));
	mainLayout.setTop(headLayout);
	mainLayout.setCenter(contentLayout);
	mainLayout.setBottom(controlLayout);


	return mainLayout;
}
 
开发者ID:CoffeeCodeSwitzerland,项目名称:Lernkartei_2017,代码行数:58,代码来源:QuizletInfoView.java


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