public class VideoGrabber extends VideoCaptureTool
Constructor and Description |
---|
VideoGrabber()
Constructor.
|
VideoGrabber(java.awt.Dimension dim)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
static VideoCaptureTool |
getTool()
Gets the shared VideoGrabber.
|
static VideoCaptureTool |
getTool(java.awt.Dimension dim)
Gets the shared VideoGrabber.
|
boolean |
isRecording()
Gets the recording flag.
|
boolean |
isVisible()
Gets the visibility.
|
protected void |
refreshGUI()
Refreshes the GUI.
|
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.
|
canCapture, send
public VideoGrabber()
public VideoGrabber(java.awt.Dimension dim)
public static VideoCaptureTool getTool()
public static VideoCaptureTool getTool(java.awt.Dimension dim)
public void clear()
clear
in interface VideoTool
clear
in class VideoCaptureTool
public boolean addFrame(java.awt.image.BufferedImage image)
addFrame
in interface VideoTool
addFrame
in class VideoCaptureTool
image
- the frame to be addedpublic void setVisible(boolean visible)
setVisible
in interface VideoTool
setVisible
in class VideoCaptureTool
visible
- true to set this visiblepublic boolean isVisible()
isVisible
in class VideoCaptureTool
public void setRecording(boolean record)
setRecording
in class VideoCaptureTool
record
- true to record rendered imagespublic boolean isRecording()
isRecording
in interface VideoTool
isRecording
in class VideoCaptureTool
public void setVideoType(VideoType type)
setVideoType
in class VideoCaptureTool
type
- the video typepublic void setFrameRate(int fps)
setFrameRate
in class VideoCaptureTool
fps
- the frame rate in frames per secondprotected void createGUI()
protected void createActions()
protected void refreshGUI()