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

Martin Sladecek martin.sladecek at oracle.com
Wed May 22 07:30:33 PDT 2013

Hi Mick,
I would like to introduce similar call, see 
I called it requestParentLayout. There's an implementation in the 
attached diff : 


On 05/22/2013 04:18 PM, mick.fleming 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