|
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.JPEGImageObserver
public class JPEGImageObserver
A one-shot image observer that turns the image into a JPEG image.
This oneshot will only write a single image the first time it is called. After that it will ignore any incoming requests.
If the filename already exists, it will automatically overwrite the existing image. If the filename contains non-existant intermediate directories, these will be automatically created.
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 | |
---|---|
JPEGImageObserver()
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 |
setCaptureNextFrame()
Tell the observer to capture the next frame it is told about. |
void |
setFilename(java.lang.String name)
Set the filename that this will write to. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JPEGImageObserver()
Method Detail |
---|
public void setCaptureNextFrame()
java.lang.IllegalStateException
- The image capture has already firedpublic void setFilename(java.lang.String name) throws java.lang.IllegalStateException
name
- The name of the file to write to.
java.lang.IllegalStateException
- Calling to set the name after the image
capture has firedpublic 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 |