Possible limitations with Trident's implementation
- From: Burt Alexander <burt.alexander@gmail.com>
- To: dev@trident.kenai.com
- Subject: Possible limitations with Trident's implementation
- Date: Thu, 16 Jul 2009 19:24:09 +1000
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; b=UdqaINIu2G6Aa4itfA5naU1d8aZlM1yzGKQLT5446wJb2Hg64sgr4ALOuTFeudtUSe nkEUc1kL65TgDLVAI1Ptk2CQacE0Oy6U/VteUU36glxcl+Bitr86eSofEpPXtn6Cmtvo uvxHAXcyUGy9et79IZferCJ49VSJx8dZ9eCYM=
|
Hi Kirill, I'm moving this discussion to the dev mailing list as
requested. And as the title of this email suggests, the limitations
may very well lie with my current understanding of Trident. Out of the box, Trident didn't work (wrt its usage) as I expected it to work; as I mentioned I could not work out how to chain Timelines together in the manner I wished. As I also mentioned I've come up with a solution for this (and based on our discussion & the thinking it triggered, I've improved upon it; pls look at the latest version of TimelineChain and my subclass of Timeline - StatefulTimeline - within my Java 5/Swing version of your 1.0 release, for the details). The simplest use I make of TimelineChain is in my startup splash screen. With the animation I wish to transition between two colours quickly for a couple of times, then return to the original colour much more slowly. Here's how I accomplish this with TimelineChain: private void animateBackground() { chain = new TimelineChain(getContentPane()); // Play from the original colour to another, // looping twice. chain.addTimeline(200, null, RepeatBehavior.REVERSE, 2); chain.addTransition("background", ANIM); // Play to the second colour as quickly chain.addTimeline(200); chain.addTransition("background", ANIM); // Slowly return to the original colour chain.addTimeline(2000); chain.addTransition("background", BACKGROUND); chain.play(); } TimelineChain only ever calls the 'play()' method on Timeline. Using StatefulTimeline I am able to construct a Timeline object that determines which of its 'play' methods to invoke based upon its state, upon execution of its 'play()' method. How would you recommend I accomplish the same functionality using just the Trident classes? I'm unsure what you meant when you said "I'm not quite comfortable with exposing this functionality to the application". StatefulTimeline does not expose anything which isn't already exposed, rather it provides the ability to define repeat behaviour, loop counts and skips prior to the invoking of 'play()' - which is how I'd expect to use it. I am getting long in the tooth; perhaps I'm just set in my ways ;>) Thank you for your time & thanks again for the library. Burton. |
|
Possible limitations with Trident's implementation |
Burt Alexander | 07/16/2009 |
| Kirill Grouchnikov | 07/16/2009 | |
| Burt Alexander | 07/17/2009 |





