|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.ui.image.JPEGSequenceObserver
public class JPEGSequenceObserver
An image observer that turns each call into an separate JPEG image as a sequentially numbered set.
The purpose of this observer is to create a sequence of images to be
captured to disk so that we could make a video type presentation out of
them at a later date. The generated filenames start from the base name
given and just add a sequence number and the .jpg
extension.
This uses the Sun codec classes to save the image to disk. Don't know how this will react on non-sun JVMs.
Constructor Summary | |
---|---|
JPEGSequenceObserver()
Construct a default observer with no filename set and it has not yet captured an image. |
Method Summary | |
---|---|
void |
canvasImageCaptured(java.awt.image.BufferedImage img)
Notification that an image has been captured from the canvas and is ready for processing. |
void |
setEnabled(boolean enable)
Tell the observer to start or stop capturing the next frame it is told about. |
void |
setFileDetails(java.lang.String dir,
java.lang.String fileBase)
Set the recording details about the directory that should be written to and the base filename to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JPEGSequenceObserver()
Method Detail |
---|
public void setFileDetails(java.lang.String dir, java.lang.String fileBase)
dir
- The directory to usefileBase
- The base filename to use
java.lang.IllegalArgumentException
- One or other of the params are null
java.lang.IllegalStateException
- The capturing is current enabledpublic void setEnabled(boolean enable)
enable
- true to start capturing imagespublic void canvasImageCaptured(java.awt.image.BufferedImage img)
canvasImageCaptured
in interface CapturedImageObserver
img
- The image that was captured
java.lang.IllegalStateException
- The filename has not been set
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |