Package com.kitfox.svg.app
Class PlayerThread
- java.lang.Object
-
- com.kitfox.svg.app.PlayerThread
-
- All Implemented Interfaces:
java.lang.Runnable
public class PlayerThread extends java.lang.Object implements java.lang.Runnable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) double
curTime
(package private) java.util.HashSet<PlayerThreadListener>
listeners
(package private) int
playState
static int
PS_PLAY_BACK
static int
PS_PLAY_FWD
static int
PS_STOP
(package private) java.lang.Thread
thread
(package private) double
timeStep
-
Constructor Summary
Constructors Constructor Description PlayerThread()
Creates a new instance of PlayerThread
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(PlayerThreadListener listener)
void
exit()
private void
fireTimeUpdateEvent()
double
getCurTime()
int
getPlayState()
double
getTimeStep()
void
run()
void
setCurTime(double time)
void
setPlayState(int playState)
void
setTimeStep(double time)
-
-
-
Field Detail
-
listeners
java.util.HashSet<PlayerThreadListener> listeners
-
curTime
double curTime
-
timeStep
double timeStep
-
PS_STOP
public static final int PS_STOP
- See Also:
- Constant Field Values
-
PS_PLAY_FWD
public static final int PS_PLAY_FWD
- See Also:
- Constant Field Values
-
PS_PLAY_BACK
public static final int PS_PLAY_BACK
- See Also:
- Constant Field Values
-
playState
int playState
-
thread
java.lang.Thread thread
-
-
Method Detail
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
exit
public void exit()
-
addListener
public void addListener(PlayerThreadListener listener)
-
getCurTime
public double getCurTime()
-
setCurTime
public void setCurTime(double time)
-
getTimeStep
public double getTimeStep()
-
setTimeStep
public void setTimeStep(double time)
-
getPlayState
public int getPlayState()
-
setPlayState
public void setPlayState(int playState)
-
fireTimeUpdateEvent
private void fireTimeUpdateEvent()
-
-