com.extjs.gxt.ui.client.fx
Class Fx

java.lang.Object
  extended by com.extjs.gxt.ui.client.event.BaseObservable
      extended by com.extjs.gxt.ui.client.fx.Fx
All Implemented Interfaces:
Observable

public class Fx
extends BaseObservable

Runs an effect and fires events. The run multiple effects see MultiEffect.

Events:
EffectStart : FxEvent(fx, effect)
Fires after an effect is started.
EffecCancel : FxEvent(fx, effect)
Fires after an effect has been cancelled.
EffecComplete : FxEvent(fx,effect)
Fires after an effect has been completed


Field Summary
protected  com.google.gwt.animation.client.Animation animation
           
protected  int duration
           
protected  Effect effect
           
 
Constructor Summary
Fx()
           
Fx(FxConfig config)
           
 
Method Summary
 void addEffectListener(EffectListener listener)
          Adds a listener to be notified of effect events.
 void cancel()
          Cancels the effect.
 Effect getEffect()
          Returns the effect.
protected  void onCancel()
           
protected  void onComplete()
           
protected  void onStart()
           
protected  void onUpdate(double progress)
           
 void removeEffectListener(EffectListener listener)
          Removes a previously added effect listener.
 boolean run(Effect effect)
          Runs the effect for the given duration.
 boolean run(int duration, Effect effect)
          Runs the effect for the given duration.
 
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable
addListener, callListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

effect

protected Effect effect

animation

protected com.google.gwt.animation.client.Animation animation

duration

protected int duration
Constructor Detail

Fx

public Fx()

Fx

public Fx(FxConfig config)
Method Detail

addEffectListener

public void addEffectListener(EffectListener listener)
Adds a listener to be notified of effect events.

Parameters:
listener - the listener to be added

getEffect

public Effect getEffect()
Returns the effect.

Returns:
the effect

cancel

public void cancel()
Cancels the effect.


removeEffectListener

public void removeEffectListener(EffectListener listener)
Removes a previously added effect listener.

Parameters:
listener - the listener to be removed

run

public boolean run(Effect effect)
Runs the effect for the given duration.

Parameters:
effect - the effect run
Returns:
true if the effect is run

run

public boolean run(int duration,
                   Effect effect)
Runs the effect for the given duration.

Parameters:
duration - the effect duration in milliseconds
effect - the effect run
Returns:
true if the effect is run

onCancel

protected void onCancel()

onComplete

protected void onComplete()

onStart

protected void onStart()

onUpdate

protected void onUpdate(double progress)