org.apache.batik.anim.values

Class AnimatableNumberOptionalNumberValue

public class AnimatableNumberOptionalNumberValue extends AnimatableValue

A number-optional-number value in the animation system.
Field Summary
protected booleanhasOptionalNumber
Whether the optional number is present.
protected floatnumber
The first number.
protected floatoptionalNumber
The optional number.
Constructor Summary
protected AnimatableNumberOptionalNumberValue(AnimationTarget target)
Creates a new, uninitialized AnimatableNumberOptionalNumberValue.
AnimatableNumberOptionalNumberValue(AnimationTarget target, float n)
Creates a new AnimatableNumberOptionalNumberValue with one number.
AnimatableNumberOptionalNumberValue(AnimationTarget target, float n, float on)
Creates a new AnimatableNumberOptionalNumberValue with two numbers.
Method Summary
booleancanPace()
Returns whether two values of this type can have their distance computed, as needed by paced animation.
floatdistanceTo(AnimatableValue other)
Returns the absolute distance between this value and the specified other value.
StringgetCssText()
Returns the CSS text representation of the value.
floatgetNumber()
Returns the first number.
floatgetOptionalNumber()
Returns the optional number.
AnimatableValuegetZeroValue()
Returns a zero value of this AnimatableValue's type.
booleanhasOptionalNumber()
Returns whether the optional number is present.
AnimatableValueinterpolate(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier)
Performs interpolation to the given value.

Field Detail

hasOptionalNumber

protected boolean hasOptionalNumber
Whether the optional number is present.

number

protected float number
The first number.

optionalNumber

protected float optionalNumber
The optional number.

Constructor Detail

AnimatableNumberOptionalNumberValue

protected AnimatableNumberOptionalNumberValue(AnimationTarget target)
Creates a new, uninitialized AnimatableNumberOptionalNumberValue.

AnimatableNumberOptionalNumberValue

public AnimatableNumberOptionalNumberValue(AnimationTarget target, float n)
Creates a new AnimatableNumberOptionalNumberValue with one number.

AnimatableNumberOptionalNumberValue

public AnimatableNumberOptionalNumberValue(AnimationTarget target, float n, float on)
Creates a new AnimatableNumberOptionalNumberValue with two numbers.

Method Detail

canPace

public boolean canPace()
Returns whether two values of this type can have their distance computed, as needed by paced animation.

distanceTo

public float distanceTo(AnimatableValue other)
Returns the absolute distance between this value and the specified other value.

getCssText

public String getCssText()
Returns the CSS text representation of the value.

getNumber

public float getNumber()
Returns the first number.

getOptionalNumber

public float getOptionalNumber()
Returns the optional number.

getZeroValue

public AnimatableValue getZeroValue()
Returns a zero value of this AnimatableValue's type.

hasOptionalNumber

public boolean hasOptionalNumber()
Returns whether the optional number is present.

interpolate

public AnimatableValue interpolate(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier)
Performs interpolation to the given value. Number-optional-number values cannot be interpolated.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.