Layout issues

Sebastian Rheinnecker sebastian.rheinnecker at yworks.com
Wed Oct 10 08:21:29 PDT 2012


Uhm, I meant to say "I overrode resize(double, double)". Don't know why 
it slipped ;)

On 10.10.2012 17:15, Sebastian Rheinnecker wrote:
> Hi Scott,
>
> I experienced quite a similar issue a while ago where a custom control 
> of mine got resized over and over again although no changes to the 
> width or height where applied. I overrode and made sure that if the 
> values didn't change it all the method in the super class aren't 
> called. That solved the issue for me.
>
> Kind regards,
> Sebastian
>
> On 10.10.2012 15:56, Randahl Fink Isaksen wrote:
>> Scott, in my experience this is not how JavaFX works in general. All 
>> my layoutChildren methods are only called when I change a property 
>> that directly or indirectly affects the layout, such as changing the 
>> text of a label or invoking requestLayout().
>>
>> Your application must be doing something actively for this to happen, 
>> I believe.
>>
>> Perhaps you could remove parts of your UI until you isolate the 
>> component causing the problem.
>>
>> Randahl
>>
>>
>>
>> On Oct 10, 2012, at 15:42 , Scott Palmer <swpalmer at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I have a custom container extending Pane that implements 
>>> layoutChildren.  I've noticed that this method is called 
>>> continuously even though my scene is static.  It's like something is 
>>> always in the list of "dirty" nodes and is forcing a re-layout.   I 
>>> don't understand this.  I've googled but I can't find a decent 
>>> tutorial for implementing custom containers or custom layouts.
>>>
>>> Part of the problem with my application is that nodes are not 
>>> properly shrining when I remove content from within them, they 
>>> shrink a little, but not as much as they should.  I'm still 
>>> debugging, but wonder if there is any insight into how the layout 
>>> system works that I've missed somewhere?
>>>
>>> Thanks,
>>>
>>> Scott
>
>


-- 
Sebastian Rheinnecker
phone: +49 7071 9709050
fax: +49 7071 9709051

yWorks GmbH
Vor dem Kreuzberg 28
72070 Tuebingen
Germany
http://www.yworks.com
Managing Directors: Sebastian Müller, Michael Pfahler
Commercial Registry: Stuttgart, Germany, HRB 382340



More information about the openjfx-dev mailing list