|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.media.core.VideoIO
public class VideoIO
This provides static methods for managing video and text input/output.
Field Summary | |
---|---|
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<VideoType> |
videoTypes
|
Constructor Summary | |
---|---|
protected |
VideoIO()
protected constructor to discourage instantiation |
Method Summary | |
---|---|
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[] |
getChooserFiles(java.lang.String type)
Displays a file chooser and returns the chosen files. |
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 |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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<VideoType> videoTypes
protected static java.lang.String defaultXMLExt
Constructor Detail |
---|
protected VideoIO()
Method Detail |
---|
public static java.lang.String getExtension(java.io.File file)
file
- the file
public 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 path
public static void addVideoType(VideoType type)
type
- the video typepublic static VideoType[] getVideoTypes()
public static Video getVideo(java.io.File file)
file
- the file
public static Video clone(Video video)
video
- the video to clone
public static java.io.File open(VideoPanel vidPanel)
vidPanel
- the video panel
public static java.io.File[] getChooserFiles(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 panel
public static java.io.File save(java.io.File file, VideoPanel vidPanel)
file
- the file to write tovidPanel
- the video panel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |