本文整理了Java中javafx.scene.layout.HBox.setPrefHeight()
方法的一些代码示例,展示了HBox.setPrefHeight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HBox.setPrefHeight()
方法的具体详情如下:
包路径:javafx.scene.layout.HBox
类名称:HBox
方法名:setPrefHeight
暂无
代码示例来源:origin: stackoverflow.com
layout.setStyle("-fx-padding: 10; -fx-background-color: cornsilk;");
layout.getChildren().addAll(adminPane, viewPane, connectivityPane);
layout.setPrefHeight(150);
layout.getStylesheets().add(this.getClass().getResource("titledpanecustomization.css").toExternalForm());
primaryStage.setScene(new Scene(layout));
代码示例来源:origin: stackoverflow.com
HBox hTis=new HBox(tis);
hTis.setAlignment(Pos.TOP_CENTER);
hTis.setPrefHeight(20); // <-- Adjust this value
TreeItem<String> ti1 = new TreeItem<>("Inbox2",hTis);
...
代码示例来源:origin: stackoverflow.com
public void tagButton(HBox box,String tag){
ImageView closeImg = new ImageView(toUse);
HBox button = new HBox();
button.setStyle("-fx-padding:4;" +
" -fx-border-width: 2;" +
" -fx-border-color: black;" +
" -fx-border-radius: 4;" +
" -fx-background-color: f1f1f1;" +
" -fx-border-insets: 5;");
button.setPrefHeight(20);
button.getChildren().addAll(new Label(tag),closeImg);
closeImg.setOnMouseClicked(event ->
box.getChildren().remove(button)
);
button.setOnMouseClicked(event -> {
//doSomethig
});
box.getChildren().add(button);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
public InternalTab(final String title) {
this.title.set(title);
getStyleClass().setAll("InternalTab-primary");
toolbar.setStyle("-fx-background-color: white; " + "-fx-border-color: #e5e5e5; " + "-fx-border-width: 0 0 1 0;" + "-fx-padding: 15 5 8 5;");
toolbar.setSpacing(10);
toolbar.setPrefHeight(25);
toolbar.setVisible(false);
toolbar.setManaged(false);
setStyle("-fx-min-width: 100;" + "-fx-padding: 0 10 0 10");
}
代码示例来源:origin: stackoverflow.com
navBar.setPrefHeight(42);
代码示例来源:origin: stackoverflow.com
box.setPrefHeight(25.0);
代码示例来源:origin: stackoverflow.com
primaryStage.initStyle(StageStyle.TRANSPARENT);
HBox hbox = new HBox(10.0);
hbox.setPrefHeight(70);
hbox.setFillHeight(true);
BackgroundFill bf = new BackgroundFill(Color.BLUEVIOLET, new CornerRadii(1), null);
代码示例来源:origin: com.aquafx-project/aquafx
progress.setPrefHeight(40);
box3.setAlignment(Pos.CENTER);
box3.setPrefHeight(50);
box3.getChildren().addAll(progress);
mainbox.getChildren().add(box3);
代码示例来源:origin: stackoverflow.com
Tpanel = new HBox(25);
Tpanel.setPrefWidth(500);
Tpanel.setPrefHeight(50);
Tpanel.setAlignment(Pos.TOP_CENTER);
red = new Button("Red");
Bpanel.setPrefHeight(75);
green = new RadioButton("Green");
blue = new RadioButton("Blue");
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @return
*/
public static Node headerVerticalSeparator() {
final HBox box = new HBox();
box.setStyle("-fx-background-color:white;-fx-opacity:0.70");
box.minHeightProperty().bind(box.prefHeightProperty());
box.maxHeightProperty().bind(box.prefHeightProperty());
box.minWidthProperty().bind(box.prefWidthProperty());
box.maxWidthProperty().bind(box.prefWidthProperty());
box.setPrefWidth(2);
box.setPrefHeight(30);
// translate the box because the toolbar is top right aligned
// we can not align the toolbar center, too complex to handle!!!
box.setTranslateY(-2);
return box;
}
代码示例来源:origin: PhoenicisOrg/phoenicis
protected void drawFooter() {
HBox footer = new HBox();
footer.setAlignment(Pos.CENTER_RIGHT);
footer.setPadding(new Insets(8));
footer.setSpacing(10);
footer.setPrefHeight(45);
footer.setId("footer");
getParent().getRoot().setBottom(footer);
Button cancelButton = new Button(tr("Cancel"));
nextButton = new Button(tr("Next"));
footer.getChildren().addAll(cancelButton, nextButton);
cancelButton.setOnMouseClicked(event -> {
cancelButton.setDisable(true);
messageWaitingForResponse.sendCancelSignal();
});
}
代码示例来源:origin: com.aquafx-project/aquafx
progress.setPrefHeight(40);
box3.setAlignment(Pos.CENTER);
box3.setPrefHeight(50);
box3.getChildren().addAll(progress);
mainbox.getChildren().add(box3);
内容来源于网络,如有侵权,请联系作者删除!