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) doublecurTime(package private) java.util.HashSet<PlayerThreadListener>listeners(package private) intplayStatestatic intPS_PLAY_BACKstatic intPS_PLAY_FWDstatic intPS_STOP(package private) java.lang.Threadthread(package private) doubletimeStep
-
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 voidaddListener(PlayerThreadListener listener)voidexit()private voidfireTimeUpdateEvent()doublegetCurTime()intgetPlayState()doublegetTimeStep()voidrun()voidsetCurTime(double time)voidsetPlayState(int playState)voidsetTimeStep(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:
runin 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()
-
-