com.miginfocom.ashape.animation.animations
Class TexturePaintAnimation

java.lang.Object
  extended by com.miginfocom.ashape.animation.animations.AbstractAnimation
      extended by com.miginfocom.ashape.animation.animations.TexturePaintAnimation
All Implemented Interfaces:
Animation, java.io.Serializable

public class TexturePaintAnimation
extends AbstractAnimation

Animates from one TexturePaint to another.

See Also:
GfxUtil.getCrossTexturePaint(java.awt.TexturePaint, java.awt.TexturePaint, float, int, boolean), Serialized Form

Constructor Summary
TexturePaintAnimation(java.awt.TexturePaint tp1, java.awt.TexturePaint tp2, int cacheFrameCount)
          Constructor.
 
Method Summary
protected  java.lang.Object createObject(float d)
          Returns a newly created object that complies to the same rules as AbstractAnimation.getObject(float).
 boolean equals(java.lang.Object o)
           
 java.awt.TexturePaint getEndPaint()
          Returns the start AbsRect.
 java.awt.TexturePaint getStartPaint()
          Returns the start AbsRect.
 
Methods inherited from class com.miginfocom.ashape.animation.animations.AbstractAnimation
createCache, createCacheImpl, getFrameCount, getObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TexturePaintAnimation

public TexturePaintAnimation(java.awt.TexturePaint tp1,
                             java.awt.TexturePaint tp2,
                             int cacheFrameCount)
Constructor.

Parameters:
tp1 - The texture paint to animate from. Should have a serializasion delegate if the animation should be setrialized. E.g. XtdTexturePaint
tp2 - The texture paint to animate to. Should have a serializasion delegate if the animation should be setrialized. E.g. XtdTexturePaint
cacheFrameCount - The number of frames to create. 0 creates no cache at all and all object are created when they are asked for.
call AbstractAnimation.createCache(boolean) with true as the last row in sub-constructor to create the cache in a background thread.
Method Detail

createObject

protected java.lang.Object createObject(float d)
Description copied from class: AbstractAnimation
Returns a newly created object that complies to the same rules as AbstractAnimation.getObject(float). For subclasses to implement.

Specified by:
createObject in class AbstractAnimation
Parameters:
d - 0.0 to 1.0 0.0 is the first Object/frame and 1.0 is the last.
Returns:
A newly created object that complies to the same rules as AbstractAnimation.getObject(float).

getStartPaint

public java.awt.TexturePaint getStartPaint()
Returns the start AbsRect.

Returns:
The start AbsRect.

getEndPaint

public java.awt.TexturePaint getEndPaint()
Returns the start AbsRect.

Returns:
The start AbsRect.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class AbstractAnimation


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.