< prev index next >
modules/graphics/src/main/java/javafx/scene/layout/FlowPane.java
Print this page
*** 71,91 ****
* <pre><code> Image images[] = { ... };
* FlowPane flow = new FlowPane();
* flow.setVgap(8);
* flow.setHgap(4);
* flow.setPrefWrapLength(300); // preferred width = 300
! * for (int i = 0; i < images.length; i++) {
* flow.getChildren().add(new ImageView(image[i]);
* }
* </code></pre>
*
*<p>
* Example of a vertical flowpane:
* <pre><code> FlowPane flow = new FlowPane(Orientation.VERTICAL);
* flow.setColumnHalignment(HPos.LEFT); // align labels on left
* flow.setPrefWrapLength(200); // preferred height = 200
! * for (int i = 0; i < titles.size(); i++) {
* flow.getChildren().add(new Label(titles[i]);
* }
* </code></pre>
*
* <p>
--- 71,91 ----
* <pre><code> Image images[] = { ... };
* FlowPane flow = new FlowPane();
* flow.setVgap(8);
* flow.setHgap(4);
* flow.setPrefWrapLength(300); // preferred width = 300
! * for (int i = 0; i < images.length; i++) {
* flow.getChildren().add(new ImageView(image[i]);
* }
* </code></pre>
*
*<p>
* Example of a vertical flowpane:
* <pre><code> FlowPane flow = new FlowPane(Orientation.VERTICAL);
* flow.setColumnHalignment(HPos.LEFT); // align labels on left
* flow.setPrefWrapLength(200); // preferred height = 200
! * for (int i = 0; i < titles.size(); i++) {
* flow.getChildren().add(new Label(titles[i]);
* }
* </code></pre>
*
* <p>
*** 194,204 ****
super();
}
/**
* Creates a FlowPane layout with the specified orientation and hgap/vgap = 0.
! * @param orientation the direction the tiles should flow & wrap
*/
public FlowPane(Orientation orientation) {
this();
setOrientation(orientation);
}
--- 194,204 ----
super();
}
/**
* Creates a FlowPane layout with the specified orientation and hgap/vgap = 0.
! * @param orientation the direction the tiles should flow & wrap
*/
public FlowPane(Orientation orientation) {
this();
setOrientation(orientation);
}
*** 214,224 ****
setVgap(vgap);
}
/**
* Creates a FlowPane layout with the specified orientation and hgap/vgap.
! * @param orientation the direction the tiles should flow & wrap
* @param hgap the amount of horizontal space between each tile
* @param vgap the amount of vertical space between each tile
*/
public FlowPane(Orientation orientation, double hgap, double vgap) {
this();
--- 214,224 ----
setVgap(vgap);
}
/**
* Creates a FlowPane layout with the specified orientation and hgap/vgap.
! * @param orientation the direction the tiles should flow & wrap
* @param hgap the amount of horizontal space between each tile
* @param vgap the amount of vertical space between each tile
*/
public FlowPane(Orientation orientation, double hgap, double vgap) {
this();
*** 237,247 ****
getChildren().addAll(children);
}
/**
* Creates a FlowPane layout with the specified orientation and hgap/vgap = 0.
! * @param orientation the direction the tiles should flow & wrap
* @param children The initial set of children for this pane.
* @since JavaFX 8.0
*/
public FlowPane(Orientation orientation, Node... children) {
this();
--- 237,247 ----
getChildren().addAll(children);
}
/**
* Creates a FlowPane layout with the specified orientation and hgap/vgap = 0.
! * @param orientation the direction the tiles should flow & wrap
* @param children The initial set of children for this pane.
* @since JavaFX 8.0
*/
public FlowPane(Orientation orientation, Node... children) {
this();
*** 263,273 ****
getChildren().addAll(children);
}
/**
* Creates a FlowPane layout with the specified orientation and hgap/vgap.
! * @param orientation the direction the tiles should flow & wrap
* @param hgap the amount of horizontal space between each tile
* @param vgap the amount of vertical space between each tile
* @param children The initial set of children for this pane.
* @since JavaFX 8.0
*/
--- 263,273 ----
getChildren().addAll(children);
}
/**
* Creates a FlowPane layout with the specified orientation and hgap/vgap.
! * @param orientation the direction the tiles should flow & wrap
* @param hgap the amount of horizontal space between each tile
* @param vgap the amount of vertical space between each tile
* @param children The initial set of children for this pane.
* @since JavaFX 8.0
*/
< prev index next >