Package org.opensourcephysics.media.core
Class ImageVideoType
java.lang.Object
org.opensourcephysics.media.core.ImageVideoType
- All Implemented Interfaces:
VideoType
- Direct Known Subclasses:
VideoIO.ZipImageVideoType
This implements the VideoType interface with a buffered image type.
- Version:
- 1.0
- Author:
- Douglas Brown
-
Field Summary
Fields inherited from interface org.opensourcephysics.media.core.VideoType
TYPE_GIF, TYPE_IMAGE
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor uses all available file types.ImageVideoType
(VideoFileFilter filter) Constructor with a file filter for a specific image type. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Reports whether this type can record videosGets the default extension for this type.Gets the default file filter for this type.Gets the name and/or description of this type.Gets the file filters for this type.Gets a video recorder.Gets the short name of the video type.Opens a video file as an ImageVideo.getVideo
(String name, String basePath, XMLControl control) Create a Video object from a file drop, file open, or TRK or TRZ file.boolean
Return true if the specified video is this type.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opensourcephysics.media.core.VideoType
_toString, accepts, getVideo, getVideoControlForExportOnly
-
Constructor Details
-
ImageVideoType
public ImageVideoType()Default constructor uses all available file types. -
ImageVideoType
Constructor with a file filter for a specific image type.- Parameters:
filter
- the file filter
-
-
Method Details
-
getVideo
Opens a video file as an ImageVideo.- Parameters:
file
- the video file- Returns:
- a new image video
-
getVideo
Description copied from interface:VideoType
Create a Video object from a file drop, file open, or TRK or TRZ file. Also called with non-null basePath from ExportZipDialog.Export.modifyControlForClip -
getRecorder
Gets a video recorder.- Specified by:
getRecorder
in interfaceVideoType
- Returns:
- the video recorder
-
canRecord
public boolean canRecord()Reports whether this type can record videos -
getDescription
Gets the name and/or description of this type.- Specified by:
getDescription
in interfaceVideoType
- Returns:
- a description
-
getDefaultExtension
Gets the default extension for this type.- Specified by:
getDefaultExtension
in interfaceVideoType
- Returns:
- a description
-
getFileFilters
Gets the file filters for this type.- Specified by:
getFileFilters
in interfaceVideoType
- Returns:
- a file filter
-
getDefaultFileFilter
Gets the default file filter for this type. May return null.- Specified by:
getDefaultFileFilter
in interfaceVideoType
- Returns:
- the default file filter
-
isType
Return true if the specified video is this type. -
getTypeName
Description copied from interface:VideoType
Gets the short name of the video type.- Specified by:
getTypeName
in interfaceVideoType
- Returns:
- the type name
-
toString
-