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