org.xith3d.schedops.properties
Class ScheduledTextureChanger

java.lang.Object
  extended by org.xith3d.schedops.properties.ScheduledTextureChanger
All Implemented Interfaces:
ScheduledOperation, Updatable

public class ScheduledTextureChanger
extends java.lang.Object
implements ScheduledOperation

Schedules a Texture change (thread safely).


Constructor Summary
ScheduledTextureChanger(OperationScheduler opScheder, Appearance app)
          Creates a new TextureChanger.
 
Method Summary
 boolean isAlive()
          if false, the object will be removed from the scheduler next loop iteration
 boolean isPersistent()
          If this operation is persistent, it remains scheduled after beeing executed once.
 void setAlive(boolean alive)
          Sets this Object alive or dead.
 void setTexture(Texture texture)
          Creates a new TextureChanger.
 void update(long gameTime, long frameTime, UpdatingThread.TimingMode timingMode)
          Updates this Updatable object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScheduledTextureChanger

public ScheduledTextureChanger(OperationScheduler opScheder,
                               Appearance app)
Creates a new TextureChanger.

Parameters:
opScheder - the OperationScheduler to handle this operation
app - the Appearance that holds the Texture
Method Detail

isPersistent

public boolean isPersistent()
If this operation is persistent, it remains scheduled after beeing executed once.

Specified by:
isPersistent in interface ScheduledOperation

setAlive

public void setAlive(boolean alive)
Sets this Object alive or dead.

Specified by:
setAlive in interface ScheduledOperation
Parameters:
alive - if false, the object will be removed from the scheduler next loop iteration

isAlive

public boolean isAlive()
Description copied from interface: ScheduledOperation
if false, the object will be removed from the scheduler next loop iteration

Specified by:
isAlive in interface ScheduledOperation
Returns:
false, if the object will be removed from the scheduler next loop iteration

update

public void update(long gameTime,
                   long frameTime,
                   UpdatingThread.TimingMode timingMode)
Updates this Updatable object.

Specified by:
update in interface Updatable
Parameters:
gameTime - the gameTime in Milliseconds
frameTime - the frameTime in Milliseconds (needed time for the last frame)
timingMode - the TimingMode to use for frameTime.

setTexture

public void setTexture(Texture texture)
Creates a new TextureChanger.

Parameters:
texture - the new Texture