public class AnimatedStroke
extends java.lang.Object
implements java.awt.Stroke
Modifier and Type | Field and Description |
---|---|
static int |
MODE_ONEWAY |
static int |
MODE_TWOWAY |
Constructor and Description |
---|
AnimatedStroke() |
AnimatedStroke(java.awt.Color c)
Creates a default 1-pixel wide stroke that animates at a default speed.
|
AnimatedStroke(java.awt.Color c, float speed)
Creates a default 1-pixel wide stroke that animates at the given speed.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Shape |
createStrokedShape(java.awt.Shape p) |
int |
getCap() |
java.awt.Color |
getColor() |
float[] |
getDash() |
int |
getJoin() |
float |
getMiterLimit() |
int |
getMode() |
float |
getPhase() |
float |
getSpeed() |
java.awt.Stroke |
getStroke() |
float |
getWidth() |
boolean |
isBackwardFlag() |
void |
setBackwardFlag(boolean backwardFlag) |
void |
setCap(int cap) |
void |
setColor(java.awt.Color color) |
void |
setDash(float[] dash) |
void |
setJoin(int join) |
void |
setMiterLimit(float miterLimit) |
void |
setMode(int mode)
sets the animation mode to either MODE_ONEWAY (the default) or MODE_TWOWAY.
|
void |
setSpeed(float speed)
Sets the speed for this stroke animation.
|
void |
setWidth(float width) |
void |
update(long elapsedTime) |
public static final int MODE_ONEWAY
public static final int MODE_TWOWAY
public AnimatedStroke()
public AnimatedStroke(java.awt.Color c)
c
-public AnimatedStroke(java.awt.Color c, float speed)
c
-speed
-public int getCap()
public void setCap(int cap)
public java.awt.Color getColor()
public void setColor(java.awt.Color color)
public float[] getDash()
public void setDash(float[] dash)
public int getJoin()
public void setJoin(int join)
public float getMiterLimit()
public void setMiterLimit(float miterLimit)
public float getSpeed()
public void setSpeed(float speed)
speed
- specifies number of pixels the animation moves along the path.public float getWidth()
public void setWidth(float width)
public int getMode()
public void setMode(int mode)
mode
-public void update(long elapsedTime)
public float getPhase()
public java.awt.Stroke getStroke()
public java.awt.Shape createStrokedShape(java.awt.Shape p)
createStrokedShape
in interface java.awt.Stroke
public void setBackwardFlag(boolean backwardFlag)
public boolean isBackwardFlag()