public class VideoIO
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static javax.swing.JFileChooser |
chooser |
protected static java.lang.String |
defaultXMLExt |
protected static javax.swing.filechooser.FileFilter |
imageFileFilter |
protected static javax.swing.filechooser.FileFilter |
qtFileFilter |
protected static javax.swing.filechooser.FileFilter |
videoFileFilter |
protected static java.util.Collection |
videoTypes |
Modifier | Constructor and Description |
---|---|
protected |
VideoIO()
protected constructor to discourage instantiation
|
Modifier and Type | Method and Description |
---|---|
static void |
addVideoType(VideoType type)
Adds a video type to the list of available types
|
static Video |
clone(Video video)
Returns a clone of the specified video.
|
static javax.swing.JFileChooser |
getChooser()
Gets the video file chooser.
|
static java.io.File |
getChooserFile(java.lang.String type)
Displays a file chooser and returns the chosen file.
|
static java.lang.String |
getExtension(java.io.File file)
Gets the extension of a file.
|
static java.lang.String |
getRelativePath(java.lang.String absolutePath)
Gets the path relative to the user directory.
|
static Video |
getVideo(java.io.File file)
Returns a video from a specified file.
|
static VideoType[] |
getVideoTypes()
Gets an array of available video types
|
static java.io.File |
open(java.io.File file,
VideoPanel vidPanel)
Loads data or a video from a specified file into a VideoPanel.
|
static java.io.File |
open(VideoPanel vidPanel)
Loads the specified video panel from a file selected with a chooser
and sets the data file of the panel.
|
static java.io.File |
recordVideo(VideoPanel vidPanel,
VideoType type)
Records a video of the current video clip and overlays.
|
static java.io.File |
save(java.io.File file,
VideoPanel vidPanel)
Writes VideoPanel data to the specified file.
|
static void |
setDefaultXMLExtension(java.lang.String ext)
Sets the default xml extension used when saving data.
|
protected static javax.swing.JFileChooser chooser
protected static javax.swing.filechooser.FileFilter videoFileFilter
protected static javax.swing.filechooser.FileFilter qtFileFilter
protected static javax.swing.filechooser.FileFilter imageFileFilter
protected static java.util.Collection videoTypes
protected static java.lang.String defaultXMLExt
public static java.lang.String getExtension(java.io.File file)
file
- the filepublic static javax.swing.JFileChooser getChooser()
public static void setDefaultXMLExtension(java.lang.String ext)
ext
- the default extensionpublic static java.lang.String getRelativePath(java.lang.String absolutePath)
absolutePath
- the absolute pathpublic static void addVideoType(VideoType type)
type
- the video typepublic static VideoType[] getVideoTypes()
public static Video getVideo(java.io.File file)
file
- the filepublic static Video clone(Video video)
video
- the video to clonepublic static java.io.File open(VideoPanel vidPanel)
vidPanel
- the video panelpublic static java.io.File getChooserFile(java.lang.String type)
type
- may be "open", "open video", "save", "qt", "insert image"public static java.io.File open(java.io.File file, VideoPanel vidPanel)
file
- the file to be loadedvidPanel
- the video panelpublic static java.io.File save(java.io.File file, VideoPanel vidPanel)
file
- the file to write tovidPanel
- the video panelpublic static java.io.File recordVideo(VideoPanel vidPanel, VideoType type)
vidPanel
- the video panel to savetype
- the video type