kinetic.util
Class HopInEffect

java.lang.Object
  |
  +--kinetic.util.CompositeEffect
        |
        +--kinetic.util.HopInEffect

public class HopInEffect
extends CompositeEffect

Hopin is a composite effect which will automatically animate chunks of text. Text is broken into segments by a Segmenter Object. Hopin jumps each word up onto the canvas using squash and stretch. It varies the height each word as well as it's landind position. Each new word appears where the previous word land making it easier to read. Words fade out after the peak of thier jump letting newer words to take the foreground. Pacing is determined by the Segmenter object.


Field Summary
protected  double baseHeight
          base height
protected  double baseWidth
          base width
protected  double baseXSquishAmount
          base width squish amount
protected  double baseYSquishAmount
          base vertical squish amount
protected  double defaultDuration
          default duration of a hop
protected  java.lang.String defaultFontFamily
          default font
protected  double defaultFontSize
          default font size
protected  java.lang.String emphasizeTag
          a tag that this compose effect recognizes
 EffectParameter.BoundedDouble energy
          energy or height of the jumping
protected  double fadeOutTime
          portion of the hop to begin fading.
protected  double heightVariation
          height variation
 EffectParameter.Percentage predictability
          horizontal and vertical variation
 EffectParameter.BoundedDouble speed
          speed of the hopping animation
 EffectParameter.BoundedDouble squishiness
          magnitude of squash and stretch
protected  double startingHeight
          base hieght of the text
protected  double widthVariation
          width variation
protected  double xSquishAmount
          x squish amount
protected  double ySquishAmount
          y squish amount
 
Fields inherited from class kinetic.util.CompositeEffect
mParameterList, mSegmenter, mTagList, name
 
Constructor Summary
HopInEffect()
          creates a new instance of the HopInEffect
HopInEffect(kinetic.util.Segmenter segmenter)
          creates a new instance of the HopInEffect using a provided segmenter.
 
Method Summary
 double build(kinetic.Sequence seq, kinetic.util.Segmenter seg, java.awt.Graphics2D g2, java.awt.Rectangle bounds, double delay)
          builds the hop in effect using the given parameters
 
Methods inherited from class kinetic.util.CompositeEffect
addParameter, addTag, build, getName, getParameter, getParameterList, getTagList, setParameters, setParamterCurrentObject, setSegmenter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

speed

public EffectParameter.BoundedDouble speed
speed of the hopping animation


energy

public EffectParameter.BoundedDouble energy
energy or height of the jumping


predictability

public EffectParameter.Percentage predictability
horizontal and vertical variation


squishiness

public EffectParameter.BoundedDouble squishiness
magnitude of squash and stretch


startingHeight

protected double startingHeight
base hieght of the text


baseWidth

protected double baseWidth
base width


baseHeight

protected double baseHeight
base height


heightVariation

protected double heightVariation
height variation


widthVariation

protected double widthVariation
width variation


fadeOutTime

protected double fadeOutTime
portion of the hop to begin fading. 0.5 means halfway.


baseYSquishAmount

protected double baseYSquishAmount
base vertical squish amount


baseXSquishAmount

protected double baseXSquishAmount
base width squish amount


ySquishAmount

protected double ySquishAmount
y squish amount


xSquishAmount

protected double xSquishAmount
x squish amount


defaultFontSize

protected double defaultFontSize
default font size


defaultDuration

protected double defaultDuration
default duration of a hop


defaultFontFamily

protected java.lang.String defaultFontFamily
default font


emphasizeTag

protected java.lang.String emphasizeTag
a tag that this compose effect recognizes

Constructor Detail

HopInEffect

public HopInEffect()
creates a new instance of the HopInEffect


HopInEffect

public HopInEffect(kinetic.util.Segmenter segmenter)
creates a new instance of the HopInEffect using a provided segmenter. The segmenter should already contain the text ot be animated.

Parameters:
segmenter - a Segmenter object
Method Detail

build

public double build(kinetic.Sequence seq,
                    kinetic.util.Segmenter seg,
                    java.awt.Graphics2D g2,
                    java.awt.Rectangle bounds,
                    double delay)
builds the hop in effect using the given parameters

Specified by:
build in class CompositeEffect
Parameters:
seq - the sequence that will contain the resulting animation
seg - the segmenter that contains the text ot be aniamted
g2 - graphics handle for intializing fonts
bounds - the dimensions of the drawing canvas
delay - the position time(ms) where the animation will be added to seq.
Returns:
duration of the resulting animation