The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

HommeDeJava (5) [Avatar] Offline
#1
Greetings,

I'm using the GWT-ext effects library in order to apply effects to GWT components, in a native manner (i.e. no flash and no external JS libraries).

I would like to know where is the documentation about chaining effects.

For example, I'm trying to have a pulsate effect (blinking).

Thanks
adam.tacy (269) [Avatar] Offline
#2
Re: GWT-Ext Question - How to chain animation effects?
Hi,

I don't use the GWT-ext library so do not know if you can do that or not.

If you mean the GWT-fx library (http://code.google.com/p/gwt-fx/) then you simply use the chain() method. For example, if you want a fade effect to follow a move effect you would write:

Move moveOne = new Move(100,0);
Fade fadeOne = new Fade();

moveOne.chain(fadeOne);

Then just add moveOne to the NEffectPanel

NEffectPanel.addEffect(moveOne);

Once the move is complete the fade will fire. If you add fadeOne to the NEffectPanel accidentally, the it will fire at the same time as moveOne.

//Adam
HommeDeJava (5) [Avatar] Offline
#3
Re: GWT-Ext Question - How to chain animation effects?
Thanks a lot!

I mean GWT-fx, probably your's library!

Sorry for the mistake.

Best regards
johnoflong (2) [Avatar] Offline
#4
Re: GWT-Ext Question - How to chain animation effects?
Hey I am making a pagination with GWT-FX and I have an image fading out the image is swapped then the image is faded in. I was wondering if there was away to use chain() to:

Fade out -> swap images -> Fade In

Right now I have a timer that starts when the fade out starts then after about 2secounds it swaps the image then the image is faded in.

I was wondering if there was a better solution. I hope I explained this well.
adam.tacy (269) [Avatar] Offline
#5
Re: GWT-Ext Question - How to chain animation effects?
chain() will only work to link effects together.

I'm plan on adding a small number of examples to the gwt-fx wiki, this functionality is one of them. See http://code.google.com/p/gwt-fx/wiki/SwapImage for draft now.

Use it as follows and it does what you are looking for, I believe:

Fade eff = new Fade();
FIRPanel test = new FIRPanel("sample1.jpg", eff);

(not 100% sure if it works in IE due to following GWT issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=863&q=IE%20Image)

If not exactly what you are looking for, you can always use it a a base.

//Adam
johnoflong (2) [Avatar] Offline
#6
Re: GWT-Ext Question - How to chain animation effects?
Thank you, that does look promising. I am not sure if I will use visImage.setUrl(newImageUrl); I only have 10 images so I will just add and remove the image from the fxpanel that I am using. I hope this will avoid that bug that you linked me.

I was wondering how you use the setEffectLength() method when I try and run it on my effect example:

fade.setEffectLegth(double effectLength)

it tells me in eclipse "The method setEffectLength(double) from the type NEffect is not visible" It is probably a really stupid reason that I did not get this to work but I googled around and could not find the solution.

Thank you in advance!

John
adam.tacy (269) [Avatar] Offline
#7
Re: GWT-Ext Question - How to chain animation effects?
Hi John,

At the moment you have to use the object returned from the getProperties() method, i.e.

fade.getProperties().setEffectLength(new value);

seemed sensible to start with, but now is not that useful; the next version will allow you to write just fade.setEffectLength(), but until then, you're unfirtunately stuck with the above.

Regards,

Adam