[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: Missed "pulse"?
From:       Rick Walker <thoughtslinger () gmail ! com>
Date:       2013-07-31 19:54:35
Message-ID: CAPBDQTM6aUvgVoBZpHOywAXOJjuycJr_Fpv=A7nNAN7JdnSsDw () mail ! gmail ! com
[Download RAW message or body]

Scott - I ran into the same problem in my app, wishing I could force a
pulse to get things properly clipped and lined up. I too wrote my own
scroll pane with clipping and transforms. The scroll pane has a single
child Group which in turn has my content as children.

My workaround involves adding ChangeListeners to the scroll pane's width
and height properties, and then explicitly setting the transforms on the
child Group in the listener's handle method.

In this way, as JavaFX lays everything out (and changes the width and
height of the scroll pane several times along the way), the child content
stays nicely aligned.

Try either binding the size of the clip node to your scroll pane's width
and height, or explicitly set it in listeners.

Rick





On Wed, Jul 31, 2013 at 11:18 AM, Scott Palmer <swpalmer@gmail.com> wrote:

> I did notice that commit.  Does that require the use of Canvas?  We aren't
> using that, at least not directly.  It didn't sound like the same thing..
> this one is really strange as *some* nodes are clipped and others aren't.
>  You can download a short video of what I'm experiencing in my app from
> here http://www.screencast.com/t/8Syrqp5nz
> This is RT-30591 <https://javafx-jira.kenai.com/browse/RT-30591>
>
> Scott
>
>
> On Wed, Jul 31, 2013 at 10:58 AM, Richard Bair <richard.bair@oracle.com
> >wrote:
>
> > Jim just fixed "RT-30223, RT-30826, RT-31044 - Canvas clears clip on
> > Windows/D3D". If you are on Windows and seeing things are drawing that
> > should be clipped, it might be related to one of these fixes. He's trying
> > to get the fix into the 2.2 line as well as in 8. I only considered just
> > now that this might be what you are seeing.
> >
> > Richard
> >
> > On Jul 31, 2013, at 7:42 AM, Scott Palmer <swpalmer@gmail.com> wrote:
> >
> > > Interesting. The problem outlined in RT-31025 does involve GridPane
> with
> > > ColumnConstraints.  I will try to dig up the code.
> > >
> > > Scott
> > >
> > >
> > >
> > > On Wed, Jul 31, 2013 at 4:47 AM, Diego Cirujano-Cuesta <
> > > diego.cirujano-cuesta@zeiss.com> wrote:
> > >
> > >> Hi Scott,
> > >>
> > >> I have a component quite similar to the one you described and I also
> had
> > >> problems like the ones that you mentioned with the same workarounds.
> > BUT I
> > >> found out that the problem was of my understanding. One of the
> problems
> > >> was, I was using invalidation listeners and I wasn't getting always
> the
> > >> value and another problem was a gridPane with column constraints.
> > >>
> > >> I had a look deeply and I fix them, now they work perfect.
> > >>
> > >> I saw in Jira you sent your code to Eva. If you want, you can send me
> > the
> > >> problem also(with the isolated code) I can have a look or much better,
> > Eva
> > >> could publish the code in Jira. I am interested.
> > >>
> > >> Regards,
> > >>
> > >> Diego
> > >>
> > >>> (I'm talking JavaFX2.x, but this happens in 8 as well.)
> > >>
> > >>> In my application I occasionally see a situation where the rendering
> > >> doesn't jive with what it should. For example I have implemented my
> own
> > >> scroll pane (ironically enough I did this to workaround manifestations
> > of a
> > >> problem similar to what I am about to describe in the stock
> ScrollPane)
> > >> using clipping and translations, but sometimes I see the clipped
> > content at
> > >> the wrong location. So my clipped content is offset from the edge of
> my
> > >> pane, or rendered over top of things outside my pane, even though it
> is
> > >> impossible for the clipping and translating to not be set together.
>  If
> > I
> > >> mouse over the offending area it suddenly snaps to the way it should
> be
> > >> (CSS rules on the content would have forced it to redraw).
> > >>
> > >>> In other situations, I may need to coax a proper rendering of certain
> > >> layouts by nudging the size of something to force another layout.
> > >>
> > >>> Obviously things should just paint correctly the first time.  In
> these
> > >> situations, the variables appear to be set to the correct values, but
> > >> somehow that didn't get to the screen.
> > >>
> > >>> I'm not certain, but I suspect I might be able to work around these
> > issues
> > >> if I could force a "pulse" or mark things as dirty some way to trigger
> > one.
> > >> The thing is, there doesn't seem to be a publicly accessible way to do
> > >> this, presumably because it isn't supposed to be necessary in the
> first
> > >> place.
> > >>> Platform.runLater(... requestLayout ...) was one workaround that I
> > started
> > >> to use, in the cases where things were particularly bad, but it isn't
> > the
> > >> sort of things I want to have to scatter throughout my code..
> > >>
> > >>> With recent testing on JavaFX 8 I had to remove some of my
> workarounds
> > >> because they caused a stack overflow doing layout. In requestLayout, I
> > >> would call requestLayout directly on some specific child nodes
> (without
> > a
> > >> runLater) that seemed to misbehave - somehow this got back to call
> > >> requestLayout again in my class and a quick attempt to break the cycle
> > >> didn't work.
> > >>
> > >>> I'm sure you can appreciate the frustration in trying to ship a
> > >> professional quality application with this sort of instability in the
> > >> rendering system.
> > >>
> > >>> Since I suspect these issues aren't going to be fixed before 7u40
> > ships,
> > >> and 8 is a long way off, what is the best thing to do?  I have already
> > >> filed bugs for issues in a few specific cases. E.g.
> > >> RT-31025<https://javafx-jira.kenai.com/browse/RT-31025> (In
> > >>
> > >> some cases from a long time ago I was unsure if I was doing something
> > wrong
> > >> so I may not have isolated things into a test case and reported a
> bug.)
> > >>
> > >>
> > >>> Regards,
> > >>
> > >>> Scott
> > >>
> > >>
> > >> ----------------------------------------
> > >> This message is intended for a particular addressee only and may
> contain
> > >> business or company secrets. If you have received this email in error,
> > >> please contact the sender and delete the message immediately. Any use
> of
> > >> this email, including saving, publishing, copying, replication or
> > >> forwarding of the message or the contents is not permitted.
> > >>
> > >>
> >
> >
>



-- 
Richard P. Walker
thoughtslinger@gmail.com

This email is intended only for the use of the individual(s) to whom it is
addressed and may be privileged and confidential. Unauthorised use or
disclosure is prohibited. If you receive this e-mail in error, please
advise immediately and delete the original message. This message may have
been altered without your or our knowledge and the sender does not accept
any liability for any errors or omissions in the message.

Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux
droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou
copie de ce message ou des renseignements qu'il contient par une personne
autre que le (les) destinataire(s) désigné(s) est interdite. Si vous
recevez ce courriel par erreur, veuillez m'en aviser immédiatement, par
retour de courriel ou par un autre moyen.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic