[API REVIEW] RT-30576 Parent : add new public layout method, optimized to only layout this parent and it's children.

Richard Bair richard.bair at oracle.com
Thu May 30 12:57:09 PDT 2013


Should this instead be a protected method rather than a public method?

On May 22, 2013, at 7:18 AM, mick.fleming <mick.fleming at oracle.com> wrote:

> 
> Hi All,
> 
> this request is to add a method to javafx.scene.Parent
> which only requests a re-layout on the parent and it's
> children.
> 
> The current requestLayout method in Parent clears the
> size cache and requests the layout of all Parents in the
> containment hierarchy. This can be unnecessary if the
> change is contained within the requesting node, and
> there is no change to it's external size, or min/max/pref
> size. A good example of this is that currently an internal
> change to a table-cell could cause an entire table to
> re-layout.
> 
> In order to solve this we could have an additional method in
> Parent which only requests the layout of the current parent
> node and it's children.
> 
> There is a significant performance gain in Table benchmarks
> when this is used in cases where it is known that there are
> no changes to either the cells dimensions or min/max/preferred
> size.
> 
> The current proposed name for this is :
>  public void requestLocalLayout()
> but suggestions are welcome, especially if they
> are more meaningful.
> 
> The jira can be found at :
> https://javafx-jira.kenai.com/browse/RT-30576
> 
> regards,
> mick
> 
> 



More information about the openjfx-dev mailing list