public abstract class AnimatableValue extends Object
Modifier and Type | Field and Description |
---|---|
protected static DecimalFormat |
decimalFormat
A formatting object to get CSS compatible float strings.
|
protected boolean |
hasChanged
Whether this value has changed since the last call to
hasChanged() . |
protected AnimationTarget |
target
The target of the animation.
|
Modifier | Constructor and Description |
---|---|
protected |
AnimatableValue(AnimationTarget target)
Creates a new AnimatableValue.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
canPace()
Returns whether two values of this type can have their distance
computed, as needed by paced animation.
|
abstract float |
distanceTo(AnimatableValue other)
Returns the absolute distance between this value and the specified other
value.
|
static String |
formatNumber(float f)
Returns a CSS compatible string version of the specified float.
|
String |
getCssText()
Returns the CSS text representation of the value.
|
abstract AnimatableValue |
getZeroValue()
Returns a zero value of this AnimatableValue's type.
|
boolean |
hasChanged()
Returns whether the value in this AnimatableValue has been modified.
|
abstract AnimatableValue |
interpolate(AnimatableValue result,
AnimatableValue to,
float interpolation,
AnimatableValue accumulation,
int multiplier)
Performs interpolation to the given value.
|
String |
toString()
Returns a string representation of this object prefixed with its
class name.
|
String |
toStringRep()
Returns a string representation of this object.
|
protected static DecimalFormat decimalFormat
protected AnimationTarget target
protected boolean hasChanged
hasChanged()
. This must be updated within interpolate(org.apache.batik.anim.values.AnimatableValue, org.apache.batik.anim.values.AnimatableValue, float, org.apache.batik.anim.values.AnimatableValue, int)
in descendant classes.protected AnimatableValue(AnimationTarget target)
public static String formatNumber(float f)
public abstract AnimatableValue interpolate(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier)
result
- the object in which to store the result of the
interpolation, or null if a new object should be createdto
- the value this value should be interpolated towards, or null
if no actual interpolation should be performedinterpolation
- the interpolation distance, 0 <= interpolation
<= 1accumulation
- an accumulation to add to the interpolated valuemultiplier
- an amount the accumulation values should be multiplied
by before being added to the interpolated valuepublic abstract boolean canPace()
public abstract float distanceTo(AnimatableValue other)
public abstract AnimatableValue getZeroValue()
public String getCssText()
public boolean hasChanged()
public String toStringRep()
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.