org.opensourcephysics.tools
Class VideoCaptureTool

java.lang.Object
  extended byorg.opensourcephysics.tools.VideoCaptureTool
All Implemented Interfaces:
java.rmi.Remote, Tool

public class VideoCaptureTool
extends java.lang.Object
implements Tool

A video capture tool. This simply forwards jobs to the media tool if it is available.


Constructor Summary
  VideoCaptureTool()
          Public constructor.
protected VideoCaptureTool(boolean ignored)
          Protected constructor for subclasses to prevent circular references.
 
Method Summary
 boolean addFrame(java.awt.image.BufferedImage image)
          Adds a frame to the video if it is recording.
 boolean canCapture()
          Determines whether this tool is functional.
 boolean isVisible()
          Gets the visibility.
 void send(Job job, Tool replyTo)
          Adds frame specified by image path.
 void setVisible(boolean visible)
          Sets the visibility.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VideoCaptureTool

public VideoCaptureTool()
Public constructor.


VideoCaptureTool

protected VideoCaptureTool(boolean ignored)
Protected constructor for subclasses to prevent circular references.

Parameters:
ignored - ignored
Method Detail

addFrame

public boolean addFrame(java.awt.image.BufferedImage image)
Adds a frame to the video if it is recording.

Parameters:
image - the frame to be added
Returns:
true if frame was added

setVisible

public void setVisible(boolean visible)
Sets the visibility.

Parameters:
visible - true to set this visible

isVisible

public boolean isVisible()
Gets the visibility.

Returns:
true if visible

canCapture

public boolean canCapture()
Determines whether this tool is functional.

Returns:
true if media capture is available

send

public void send(Job job,
                 Tool replyTo)
          throws java.rmi.RemoteException
Adds frame specified by image path.

Specified by:
send in interface Tool
Parameters:
job - the job
replyTo - the tool to reply to
Throws:
java.rmi.RemoteException