API addition to SplitPane
Jasper Potts
jasper.potts at oracle.com
Tue Jan 17 13:55:32 PST 2012
I don't think we need the added complexity of weight or priority system. This will add a whole pile of complexity to the implementation and we can not find any example use cases. It also opens up dozens of new edge cases which we would need to define and many do not have a elegant answer.
The simple boolean property is all that is needed to solve the very common use case of a application with a main content area and 1 or more side panels. Where the main content area is resized on window resize and the side panels will remain the same size. All applications we found fall into this use case.
Jasper
On Jan 13, 2012, at 10:32 AM, Richard Bair wrote:
> On Jan 12, 2012, at 12:22 PM, Daniel Zwolenski wrote:
>
>> Just wondering if there's a case for making it a weighting system (not sure
>> how useful this would be, but worth a quick thought):
>>
>> resizeWeight(Node node, float weight)
>>
>> Where the weight determines what percentage of the 'new' space the node
>> gets (and how much it loses when shrinking) and a weight of zero is
>> equivalent to your 'false'.
>
> My initial reaction was the same, although I would have used the "ALWAYS", "SOMETIMES", "NEVER" system used by GridPane.
>
> Jasper, can you articulate why you think the boolean is preferable?
>
>> Also, need to handle the case when the parent gets so small that all the
>> 'resizable' nodes are already at zero. I assume in this case the nodes with
>> resizable=false will actually start to shrink (alternatively the parent
>> pane should not be allowed to go any smaller).
>
> Ya, basically this is a system of layout requests "Please, I'd prefer not to be resized" but if it has to, it will. Note that a setMinWidth etc is going onto Stage in a few days here, so at least you will be able to create a window where the user cannot shrink it past a certain point.
>
> Richard
>
More information about the openjfx-dev
mailing list