| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.media.core.ScratchVideoRecorder
org.opensourcephysics.media.core.ImageVideoRecorder
public class ImageVideoRecorder
This is an image video recorder that uses scratch files.
| Field Summary | |
|---|---|
| protected  java.util.ArrayList<java.awt.image.BufferedImage> | images | 
| Fields inherited from class org.opensourcephysics.media.core.ScratchVideoRecorder | 
|---|
| canRecord, chooser, chooserField, dim, ext, frameCount, frameDuration, frameImage, hasContent, ignoreChooser, isSaved, saveChanges, saveFile, scratchFile, scratchName, scratchNumber, videoType | 
| Constructor Summary | |
|---|---|
| ImageVideoRecorder()Constructs a ImageVideoRecorder object. | |
| Method Summary | |
|---|---|
| protected  boolean | append(java.awt.Image image)Appends a frame to the current video. | 
| protected  int | getAppendedNumber(java.lang.String path) | 
| protected  java.lang.String | getBase(java.lang.String path) | 
| protected  java.io.File | getFileToBeSaved(java.io.File file)Return the file that will be saved if the specified file is selected. | 
|  Video | getVideo()Gets the video. | 
| protected  java.lang.String[] | saveImages(java.lang.String fileName,
           java.awt.image.BufferedImage[] images)Saves images to a numbered sequence of jpg files. | 
| protected  void | saveScratch()Required by ScratchVideoRecorder, but unused. | 
|  java.lang.String | saveVideo(java.lang.String fileName)Saves all video images to a numbered sequence of files. | 
| protected  boolean | startRecording()Starts the video recording process. | 
| Methods inherited from class org.opensourcephysics.media.core.ScratchVideoRecorder | 
|---|
| addFrame, createScratch, createVideo, createVideo, getFileName, reset, saveVideo, saveVideoAs, selectFile, setFileName, setFrameDuration, setSize | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected java.util.ArrayList<java.awt.image.BufferedImage> images
| Constructor Detail | 
|---|
public ImageVideoRecorder()
| Method Detail | 
|---|
public Video getVideo()
               throws java.io.IOException
getVideo in interface VideoRecordergetVideo in class ScratchVideoRecorderjava.io.IOException
public java.lang.String saveVideo(java.lang.String fileName)
                           throws java.io.IOException
saveVideo in interface VideoRecordersaveVideo in class ScratchVideoRecorderfileName - the file name basis for images
java.io.IOExceptionprotected void saveScratch()
saveScratch in class ScratchVideoRecorderprotected boolean startRecording()
startRecording in class ScratchVideoRecorderprotected boolean append(java.awt.Image image)
append in class ScratchVideoRecorderimage - the image to append
protected java.lang.String[] saveImages(java.lang.String fileName,
                                        java.awt.image.BufferedImage[] images)
                                 throws java.io.IOException
fileName - the file name basis for imagesimages - the images to save
java.io.IOExceptionprotected java.io.File getFileToBeSaved(java.io.File file)
getFileToBeSaved in class ScratchVideoRecorderfile - the file selected with the chooser
protected java.lang.String getBase(java.lang.String path)
protected int getAppendedNumber(java.lang.String path)
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||