Layout (original) (raw)
Tom Eugelink tbee at tbee.org
Thu Oct 4 06:30:59 PDT 2012
- Previous message: Layout
- Next message: Layout
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
But extending one of these Panes would no longer allow me to position the children myself?
On 2012-10-04 15:09, Randahl Fink Isaksen wrote:
Tom, the problem is, extending Pane directly is a lot of work. Pane does not implement a layout strategy and therefore does not implement computePrefWidth and computePrefHeight; consequently if you just nest a lot of Panes inside one another, none knows anything about size.
So, instead of extending Pane directly I have found it much more useful to extend one of the subclasses which has a layout strategy such as BorderPane, GridPane, etc. And up until this point I have not yet seen a layout that could not be implemented as an (arguably bloated) tree of subclasses of Pane. Once you extend, say, BorderPane, invoking setPrefSize(double, double) does have an effect. Yours Randahl
- Previous message: Layout
- Next message: Layout
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]