org.opensourcephysics.media.core
Class ImageVideoType

java.lang.Object
  extended by org.opensourcephysics.media.core.ImageVideoType
All Implemented Interfaces:
VideoType

public class ImageVideoType
extends java.lang.Object
implements VideoType

This implements the VideoType interface with a buffered image type.

Version:
1.0
Author:
Douglas Brown

Field Summary
protected  javax.swing.filechooser.FileFilter jpgFilter
           
protected  javax.swing.filechooser.FileFilter pngFilter
           
 
Constructor Summary
ImageVideoType()
           
 
Method Summary
 boolean canRecord()
          Reports whether this type can record videos
 java.lang.String getDefaultExtension()
          Gets the default extension for this type.
 java.lang.String getDescription()
          Gets the name and/or description of this type.
 javax.swing.filechooser.FileFilter[] getFileFilters()
          Gets the file filter for this type.
 VideoRecorder getRecorder()
          Gets a video recorder.
 Video getVideo(java.io.File file)
          Opens a video file as an ImageVideo.
 Video getVideo(java.lang.String name)
          Opens a named image as an ImageVideo.
 boolean isType(Video video)
          Return true if the specified video is this type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jpgFilter

protected javax.swing.filechooser.FileFilter jpgFilter

pngFilter

protected javax.swing.filechooser.FileFilter pngFilter
Constructor Detail

ImageVideoType

public ImageVideoType()
Method Detail

getVideo

public Video getVideo(java.io.File file)
Opens a video file as an ImageVideo.

Parameters:
file - the video file
Returns:
a new image video

getVideo

public Video getVideo(java.lang.String name)
Opens a named image as an ImageVideo.

Specified by:
getVideo in interface VideoType
Parameters:
name - the name of the image
Returns:
a new image video

getRecorder

public VideoRecorder getRecorder()
Gets a video recorder.

Specified by:
getRecorder in interface VideoType
Returns:
the video recorder

canRecord

public boolean canRecord()
Reports whether this type can record videos

Specified by:
canRecord in interface VideoType
Returns:
true if this can record videos

getDescription

public java.lang.String getDescription()
Gets the name and/or description of this type.

Specified by:
getDescription in interface VideoType
Returns:
a description

getDefaultExtension

public java.lang.String getDefaultExtension()
Gets the default extension for this type.

Specified by:
getDefaultExtension in interface VideoType
Returns:
a description

getFileFilters

public javax.swing.filechooser.FileFilter[] getFileFilters()
Gets the file filter for this type.

Specified by:
getFileFilters in interface VideoType
Returns:
a file filter

isType

public boolean isType(Video video)
Return true if the specified video is this type.

Specified by:
isType in interface VideoType
Parameters:
video - the video
Returns:
true if the video is this type