This content has been marked as final. Show 5 replies
Maybe you have a threading problem? Instead of a TimerTask, try an AnimationTimer, one of the Transition classes, or a Timeline. It may be that you are modifying the FX scene graph from the wrong thread and this is causing the issues you are seeing? Certainly having a Z transform on the rotate should be causing no problems whatsoever (unless the dang thing is tessellating the universe...).1 person found this helpful
hmm. Thanks, have no other ideas so I'll try those, but I am pretty confident I am not on the FX-Thread. I'm stumped by the drastic change in behavior after a single "setRotate(180)" call. After that point, the update thread that was using 1% starts using 99% and, in theory, is doing nothing more than a single extra transform (possibly cascading to all 4 objects), but I agree with the reply. Nothing so tasking my quad-core should weep in painful surrender.
I am not on the FX-ThreadThat's likely your issue. Anything which reads or writes the stuff displayed in the scene graph must be done on the FX application thread. Using those utilities which Richard mentions will make it so that the work is done on the FX application thread.
The reason I am "pretty sure" I am not "in" the FX-Thread is because I am using a SimpleDoubleProperty that I bind to. This is the same philosophy used to update a UI progress bar from within a worker thread.
Anyway, my problem is 1/2 fixed. lol
I was able to get the 12/06/2012 prelease build of JavaFX8 and the concurrency issue is resolved and the animation is GORGEOUS! But, now only half of the canvas is shown at any angle != 0 or 360. :-/
So now I speculate the beta code has accidentally shifted in the cache, clipping the render. Shoot...
So I think, "this" problem is solved for me and I'll open a new forum thread for the clipped cache.
I would like to thank everyone for such fast responses!!!
Mahalo Nui Loa,
The reason I am "pretty sure" I am not "in" the FX-Thread is because I am using a SimpleDoubleProperty that I bind to. This is the same philosophy used to update a UI progress bar from within a worker thread.I wouldn't advise doing that. Binding anything which is UI related to anything which is updated in a worker thread will get you into thread troubles. The worker thread will update the property which will trigger the binding which will force an update of the bound UI control property (on the worker thread when the update to the UI control property should only have been triggered from the JavaFX application thread).