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


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.
 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, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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