|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.tools.VideoCaptureTool
org.opensourcephysics.media.core.VideoGrabber
public class VideoGrabber
A video capture utility using media classes.
| Field Summary | |
|---|---|
static VideoGrabber |
VIDEO_CAPTURE_TOOL
A shared video capture tool. |
| Constructor Summary | |
|---|---|
VideoGrabber()
Constructor that uses default video dimensions. |
|
VideoGrabber(java.awt.Dimension dim)
Constructor that sets the video dimensions. |
|
| Method Summary | |
|---|---|
boolean |
addFrame(java.awt.image.BufferedImage image)
Adds a frame to the video if it is recording. |
void |
clear()
Clear the video from the tool in preparation for a new video. |
protected void |
createActions()
Creates the actions. |
protected void |
createGUI()
Creates the GUI. |
VideoRecorder |
getRecorder()
Gets the video recorder. |
static VideoGrabber |
getTool()
Gets the shared VideoGrabber. |
static VideoGrabber |
getTool(java.awt.Dimension dim)
Gets the shared VideoGrabber and sets the video dimensions. |
boolean |
isRecording()
Gets the recording flag. |
boolean |
isVisible()
Gets the visibility. |
protected void |
refreshGUI()
Refreshes the GUI. |
java.lang.String |
saveVideoAs()
Saves the video to a file and returns the file name. |
void |
setFrameRate(int fps)
Sets the frame rate. |
void |
setRecording(boolean record)
Sets the recording flag. |
void |
setVideoType(VideoType type)
Sets the video type. |
void |
setVisible(boolean visible)
Sets the visibility. |
| Methods inherited from class org.opensourcephysics.tools.VideoCaptureTool |
|---|
canCapture, send |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static VideoGrabber VIDEO_CAPTURE_TOOL
| Constructor Detail |
|---|
public VideoGrabber()
public VideoGrabber(java.awt.Dimension dim)
dim - the dimension| Method Detail |
|---|
public static VideoGrabber getTool()
public static VideoGrabber getTool(java.awt.Dimension dim)
dim - the dimension
public void clear()
clear in interface VideoToolclear in class VideoCaptureToolpublic boolean addFrame(java.awt.image.BufferedImage image)
addFrame in interface VideoTooladdFrame in class VideoCaptureToolimage - the frame to be added
public void setVisible(boolean visible)
setVisible in interface VideoToolsetVisible in class VideoCaptureToolvisible - true to set this visiblepublic boolean isVisible()
isVisible in class VideoCaptureToolpublic void setRecording(boolean record)
setRecording in class VideoCaptureToolrecord - true to record rendered imagespublic boolean isRecording()
isRecording in interface VideoToolisRecording in class VideoCaptureToolpublic void setVideoType(VideoType type)
setVideoType in class VideoCaptureTooltype - the video typepublic void setFrameRate(int fps)
setFrameRate in class VideoCaptureToolfps - the frame rate in frames per secondpublic java.lang.String saveVideoAs()
public VideoRecorder getRecorder()
protected void createGUI()
protected void createActions()
protected void refreshGUI()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||