本文整理了Java中javafx.scene.layout.VBox.setPadding()
方法的一些代码示例,展示了VBox.setPadding()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VBox.setPadding()
方法的具体详情如下:
包路径:javafx.scene.layout.VBox
类名称:VBox
方法名:setPadding
暂无
代码示例来源:origin: stackoverflow.com
Stage dialogStage = new Stage();
dialogStage.initModality(Modality.WINDOW_MODAL);
VBox vbox = new VBox(new Text("Hi"), new Button("Ok."));
vbox.setAlignment(Pos.CENTER);
vbox.setPadding(new Insets(15));
dialogStage.setScene(new Scene(vbox));
dialogStage.show();
代码示例来源:origin: stackoverflow.com
vbox.setPadding(new Insets(10, 0, 0, 10));
vbox.getChildren().addAll(label, table);
代码示例来源:origin: stackoverflow.com
vbox.setPadding(new Insets(10, 10, 10, 10));
vbox.getChildren().addAll(label, table, actionTaken);
VBox.setVgrow(table, Priority.ALWAYS);
代码示例来源:origin: stackoverflow.com
vbox.setPadding(new Insets(10, 0, 0, 10));
vbox.getChildren().addAll(label, table, setEmailButton, removeRowButton, resetButton);
代码示例来源:origin: stackoverflow.com
root.setPadding(new Insets(5));
root.setAlignment(Pos.CENTER);
代码示例来源:origin: stackoverflow.com
button
);
layout.setPadding(new Insets(10));
layout.setAlignment(Pos.CENTER);
代码示例来源:origin: stackoverflow.com
layout.setPadding(new Insets(10));
layout.setAlignment(Pos.CENTER);
layout.getChildren().setAll(
代码示例来源:origin: stackoverflow.com
DialogPane pane = new DialogPane() {
@Override
public Node createButtonBar() {
VBox vbox = new VBox(5);
vbox.setAlignment(Pos.BOTTOM_RIGHT);
vbox.setPadding(new Insets(5));
vbox.getChildren().add(super.createButtonBar());
vbox.getChildren().add(new Label("Additional text"));
return vbox ;
}
};
代码示例来源:origin: stackoverflow.com
vbox.setPadding(new Insets(10, 0, 0, 10));
vbox.getChildren().add(table);
代码示例来源:origin: stackoverflow.com
root.setPadding(new Insets(24));
primaryStage.setScene(new Scene(root));
primaryStage.show();
代码示例来源:origin: stackoverflow.com
@Override
public void start(Stage primaryStage) {
VBox root = new VBox();
root.setAlignment(Pos.CENTER);
root.setPadding(new Insets(10));
PaintPickerController controller;
final FXMLLoader loader = new FXMLLoader();
loader.setLocation(PaintPicker.class.getResource("PaintPicker.fxml"));
try {
final VBox picker = loader.load();
controller = loader.getController();
controller.paintProperty().addListener((obs, ov, nv) -> System.out.println("Paint: " + nv));
root.getChildren().add(picker);
} catch (IOException ex) {
throw new IllegalStateException(ex);
}
Scene scene = new Scene(root, 320, 600);
primaryStage.setTitle("SceneBuilder PaintPicker");
primaryStage.setScene(scene);
primaryStage.show();
}
代码示例来源:origin: stackoverflow.com
BorderPane root = new BorderPane();
Pane paneCenter= new Pane();
Canvas background= new Canvas(1200,1000);
Canvas animation = new Canvas(1200,1000);
Canvas animation2 = new Canvas(1200,1000);
paneCenter.getChildren().addAll(background, animation, animation2);
root.setCenter(paneCenter);
VBox paneRight = new VBox();
paneRight.setPrefSize(200, 1000);
paneRight.setPadding(new Insets(20));
paneRight.setAlignment(Pos.TOP_CENTER);
Button b1 = new Button("Spawn Civilian");
paneRight.getChildren().add(b1);
root.setRight(paneRight);
Scene scene = new Scene(root, 1400, 1000);
代码示例来源:origin: stackoverflow.com
root.setPadding(new Insets(24));
primaryStage.setScene( new Scene(root) );
primaryStage.show();
代码示例来源:origin: stackoverflow.com
while(!inputFile.exists()) {
window = new Stage();
window.initModality(Modality.APPLICATION_MODAL);
window.setTitle("File was not found.");
window.setMinWidth(250);
window.setMaxHeight(100);
//form
TextField fileInput = new TextField();
Button inputButton = new Button("Upload File");
inputButton.setOnAction(e -> {
inputFile = new File(fileInput.getText());
window.close();
});
//Layout
VBox layout = new VBox(10);
layout.setPadding(new Insets(20, 20, 20, 20));
layout.getChildren().addAll(fileInput, inputButton);
//Set scene and show in window.
Scene scene = new Scene(layout, 300, 100);
window.setScene(scene);
window.showAndWait();
}
代码示例来源:origin: stackoverflow.com
view.setPadding(new Insets(20));
view.setAlignment(Pos.CENTER);
代码示例来源:origin: stackoverflow.com
root.setPadding(new Insets(20));
Scene scene = new Scene(root);
scene.getStylesheets().add("text-css-test.css");
代码示例来源:origin: stackoverflow.com
VBox getTextFields()
{
VBox pane = new VBox();
pane.setPadding(new Insets(10,10,10,10));
TextField tf[]=new TextField[9];
// Add first spacer
pane.getChildren().add(createSpacer());
for(int i=0;i<tf.length;i++)
{
tf[i] = new TextField("Display Line "+(i+1));
pane.getChildren().add(tf[i]);
// Add a spacer after the label
pane.getChildren().add(createSpacer());
}
pane.setAlignment(Pos.CENTER_RIGHT);
return pane;
}
代码示例来源:origin: stackoverflow.com
@Override
public void start(Stage primaryStage) throws Exception{
TextField textfield = new TextField();
ListView listView = new ListView();
listView.getItems().add("One");
listView.getItems().add("Two");
listView.getItems().add("Three");
Button button = new Button("Button");
VBox root = new VBox(5, textfield, listView, button);
root.addEventFilter(KeyEvent.KEY_PRESSED, event->{
if (event.getCode() == KeyCode.SPACE) {
System.out.println("GOOD");
}
});
root.setAlignment(Pos.CENTER);
root.setPadding(new Insets(10));
primaryStage.setScene(new Scene(root, 400, 400));
primaryStage.show();
}
代码示例来源:origin: stackoverflow.com
layout.setPadding(new Insets(20, 20, 20, 20));
layout.getChildren().addAll(fileInput, inputButton);
代码示例来源:origin: stackoverflow.com
txtHeading.setFont(new Font(20));
HBox paneTop = new HBox(txtHeading);
paneTop.setPadding(new Insets(20, 20, 20, 20));
pane.setPadding(new Insets(20, 20, 20, 20));
内容来源于网络,如有侵权,请联系作者删除!