GifVideoRecorder, ImageVideoRecorder, ScratchVideoRecorderpublic interface VideoRecorder
| Modifier and Type | Method | Description |
|---|---|---|
void |
addFrame(java.awt.Image image) |
Adds a video frame to the current video.
|
void |
createVideo() |
Creates a new video to which frames can be added.
|
void |
createVideo(java.lang.String fileName) |
Creates a new video with the specified file name.
|
java.lang.String |
getFileName() |
Gets the current file name.
|
Video |
getVideo() |
Gets the current video.
|
void |
reset() |
Discards the current video and resets the recorder to a ready state.
|
java.lang.String |
saveVideo() |
Saves the video to the current file.
|
java.lang.String |
saveVideo(java.lang.String fileName) |
Saves the video to the specified file.
|
java.lang.String |
saveVideoAs() |
Saves the video to a file selected with a chooser.
|
void |
setFileName(java.lang.String path) |
Sets the file name.
|
void |
setFrameDuration(double millis) |
Sets the time duration per frame for subsequent added frames.
|
void |
setSize(java.awt.Dimension dimension) |
Sets the size of the video.
|
void createVideo()
throws java.io.IOException
java.io.IOExceptionvoid createVideo(java.lang.String fileName)
throws java.io.IOException
fileName - name of the file to which the video will be writtenjava.io.IOExceptionvoid setSize(java.awt.Dimension dimension)
dimension - the dimensions of the new videovoid setFrameDuration(double millis)
millis - the duration per frame in millisecondsvoid addFrame(java.awt.Image image)
throws java.io.IOException
image - the image to be drawn on the video frame.java.io.IOExceptionVideo getVideo() throws java.io.IOException
java.io.IOExceptionjava.lang.String saveVideo()
throws java.io.IOException
java.io.IOExceptionjava.lang.String saveVideo(java.lang.String fileName)
throws java.io.IOException
fileName - the file name to be savedjava.io.IOExceptionjava.lang.String saveVideoAs()
throws java.io.IOException
java.io.IOExceptionjava.lang.String getFileName()
void setFileName(java.lang.String path)
path - the file namevoid reset()