org.zilonis.tool.ext.aerith.effects
Class CompositeEffect

java.lang.Object
  extended by org.zilonis.tool.ext.aerith.effects.ComponentEffect
      extended by org.zilonis.tool.ext.aerith.effects.CompositeEffect

public class CompositeEffect
extends ComponentEffect

This Effect combines one or more sub-effects to create a more complex and interesting effect. For example, you could create an effect that both moves and scales by creating a CompositeEffect with the Move and Scale effects. Composite effects are created by simply adding effects in the order that you want them combined.


Field Summary
 
Fields inherited from class org.zilonis.tool.ext.aerith.effects.ComponentEffect
componentImage, end, height, renderComponent, start, width, x, y
 
Constructor Summary
CompositeEffect()
          Creates a CompositeEffect with no sub-effects.
CompositeEffect(ComponentEffect effect)
          Creates a CompositeEffect with the given effect as the first sub-effect.
 
Method Summary
 void addEffect(ComponentEffect effect)
          Adds an additional effect to this CompositeEffect.
 void setEnd(ComponentState end)
          This method is called during the initialization process of a transition and allows the effects to set up the end state for each effect.
 void setStart(ComponentState start)
          This method is called during the initialization process of a transition and allows the effects to set up the start state for each effect.
 void setup(java.awt.Graphics2D g2d, float fraction)
          This method is called during each frame of the transition animation and allows the effect to set up the Graphics state according to the various sub-effects in this CompositeEffect.
 
Methods inherited from class org.zilonis.tool.ext.aerith.effects.ComponentEffect
getComponent, getComponentImage, getEnd, getStart, paint, setComponentImage, setComponentStates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeEffect

public CompositeEffect()
Creates a CompositeEffect with no sub-effects. Additional sub-effects should be added via the addEffect method.


CompositeEffect

public CompositeEffect(ComponentEffect effect)
Creates a CompositeEffect with the given effect as the first sub-effect. Additional sub-effects should be added via the addEffect method.

Method Detail

addEffect

public void addEffect(ComponentEffect effect)
Adds an additional effect to this CompositeEffect. This effect is added to the end of the existing list of effects, and will be processed after the other effects have been processed.


setStart

public void setStart(ComponentState start)
This method is called during the initialization process of a transition and allows the effects to set up the start state for each effect.

Overrides:
setStart in class ComponentEffect

setEnd

public void setEnd(ComponentState end)
This method is called during the initialization process of a transition and allows the effects to set up the end state for each effect.

Overrides:
setEnd in class ComponentEffect

setup

public void setup(java.awt.Graphics2D g2d,
                  float fraction)
This method is called during each frame of the transition animation and allows the effect to set up the Graphics state according to the various sub-effects in this CompositeEffect.

Overrides:
setup in class ComponentEffect
Parameters:
g2d - the Graphics2D destination for this rendering
fraction - The fraction of elapsed time in this animation