[API Review] RT-19898: Update constructors to panes (including ScrollPane) to take content

Richard Bair richard.bair at oracle.com
Wed Jan 23 15:45:43 PST 2013


http://javafx-jira.kenai.com/browse/RT-19898

Another relatively straightforward one (I hope!). In this case I am just adding some constructors to layout panes (and scroll pane):

    public AnchorPane(Node... children) {
    public BorderPane(Node center) {
    public FlowPane(Node... children) {
    public FlowPane(Orientation orientation, Node... children) {
    public FlowPane(double hgap, double vgap, Node... children) {
    public FlowPane(Orientation orientation, double hgap, double vgap, Node... children) {
    public HBox(Node... children) {
    public HBox(double spacing, Node... children) {
    public Pane(Node... children) {
    public StackPane(Node... children) {
    public TilePane(Node... children) {
    public TilePane(Orientation orientation, Node... children) {
    public TilePane(double hgap, double vgap, Node... children) {
    public TilePane(Orientation orientation, double hgap, double vgap, Node... children) {
    public ScrollPane(Node content) {

In the case of BorderPane and ScrollPane there is a single child rather than a list of them (not that BorderPane can't handle a list, just that it generally doesn't make sense). The others are just varargs of children, and all end up calling getChildren().addAll(children). BorderPane calls setCenter(center) and ScrollPane calls setContent(content). I always let the list of children come last.

Richard


More information about the openjfx-dev mailing list