org.xith3d.loop.opscheduler
Class ScheduledScreenshot

java.lang.Object
  extended by org.xith3d.loop.opscheduler.impl.ScheduledOperationImpl
      extended by org.xith3d.loop.opscheduler.ScheduledScreenshot
All Implemented Interfaces:
ScheduledOperation, Updatable

public class ScheduledScreenshot
extends ScheduledOperationImpl

An instance of this class can be added to any implementation of OperationScheduler. ExtXith3DEnvironment implements OperationScheduler. It allows to call a takeScreenshot-method from any thread, and the shot is taken at the next RenderLoop iteration.


Constructor Summary
ScheduledScreenshot(Canvas3D canvas, java.io.File file, boolean alpha)
          Creates a new instance.
 
Method Summary
 Canvas3D getCanvas3D()
           
 java.io.File getFile()
           
 void setCanvas3D(Canvas3D canvas)
          Sets the Canvas3D to take the screenshot from.
 void setFile(java.io.File file)
          Sets the file to write the screenshot to.
 void update(long gameTime, long frameTime, UpdatingThread.TimingMode timingMode)
          Updates this Updatable object.
 
Methods inherited from class org.xith3d.loop.opscheduler.impl.ScheduledOperationImpl
isAlive, isPersistent, setAlive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScheduledScreenshot

public ScheduledScreenshot(Canvas3D canvas,
                           java.io.File file,
                           boolean alpha)
Creates a new instance.

Parameters:
canvas - the Canvas3D to take the screenshot from
file - the File to store the screenshot at
alpha - with alpha channel?
Method Detail

setCanvas3D

public void setCanvas3D(Canvas3D canvas)
Sets the Canvas3D to take the screenshot from.


getCanvas3D

public Canvas3D getCanvas3D()
Returns:
the Canvas3D to take the screenshot from.

setFile

public void setFile(java.io.File file)
Sets the file to write the screenshot to.


getFile

public java.io.File getFile()
Returns:
the file to write the screenshot to.

update

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

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