List of usage examples for javafx.scene.layout FlowPane setPrefWrapLength
public final void setPrefWrapLength(double value)
From source file:Main.java
@Override public void start(Stage primaryStage) { FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL, 20, 20); flowPane.setPrefWrapLength(210); Button btn = new Button(); for (int i = 0; i < 8; i++) { btn = new Button("Button"); btn.setPrefSize(100, 50);/*from w w w .ja v a 2s . c o m*/ flowPane.getChildren().add(btn); } System.out.println(flowPane.getAlignment()); Scene scene = new Scene(flowPane); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL, 20, 20); flowPane.setPrefWrapLength(210); Button btn = new Button(); for (int i = 0; i < 8; i++) { btn = new Button("Button"); btn.setPrefSize(100, 50);/*from w w w. ja v a2s. co m*/ flowPane.getChildren().add(btn); } System.out.println(flowPane.getRowValignment()); Scene scene = new Scene(flowPane); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { FlowPane flowPane = new FlowPane(Orientation.HORIZONTAL, 20, 20); flowPane.setPrefWrapLength(210); Button btn = new Button(); for (int i = 0; i < 8; i++) { btn = new Button("Button"); btn.setPrefSize(100, 50);/*from w ww . ja va2 s . com*/ flowPane.getChildren().add(btn); } System.out.println(flowPane.getContentBias()); Scene scene = new Scene(flowPane); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
License:asdf
@Override public void start(Stage stage) { stage.setTitle("HTML"); stage.setWidth(500);//from w w w .j a va 2 s . co m stage.setHeight(500); Scene scene = new Scene(new Group()); FlowPane flow = new FlowPane(); flow.setVgap(8); flow.setHgap(4); flow.setPrefWrapLength(300); // preferred width = 300 for (int i = 0; i < 10; i++) { flow.getChildren().add(new Button("asdf")); } scene.setRoot(flow); stage.setScene(scene); stage.show(); }
From source file:Main.java
License:asdf
@Override public void start(Stage stage) { stage.setTitle("HTML"); stage.setWidth(500);//w w w.j ava 2 s. c o m stage.setHeight(500); Scene scene = new Scene(new Group()); FlowPane flow = new FlowPane(Orientation.VERTICAL); flow.setVgap(8); flow.setHgap(4); flow.setPrefWrapLength(300); // preferred width = 300 for (int i = 0; i < 10; i++) { flow.getChildren().add(new Button("asdf")); } scene.setRoot(flow); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("FlowPane example"); FlowPane flowPane = new FlowPane(); flowPane.setPadding(new Insets(10, 10, 10, 10)); flowPane.setVgap(4);// w ww. java 2 s .c o m flowPane.setHgap(4); flowPane.setPrefWrapLength(210); Button btn = new Button(); for (int i = 0; i < 8; i++) { btn = new Button("Button"); btn.setPrefSize(100, 50); flowPane.getChildren().add(btn); } Scene scene = new Scene(flowPane); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
private FlowPane addFlowPane() { FlowPane flow = new FlowPane(); flow.setPadding(new Insets(5, 0, 5, 0)); flow.setVgap(4);//from w w w .ja v a 2s .co m flow.setHgap(4); flow.setPrefWrapLength(170); // preferred width allows for two columns flow.setStyle("-fx-background-color: DAE6F3;"); ImageView pages[] = new ImageView[8]; for (int i = 0; i < 8; i++) { pages[i] = new ImageView( new Image(Main.class.getResourceAsStream("graphics/chart_" + (i + 1) + ".png"))); flow.getChildren().add(pages[i]); } return flow; }