|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.media.core.VideoIO
org.opensourcephysics.cabrillo.tracker.TrackerIO
public class TrackerIO
This provides static methods for managing video and text input/output.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.opensourcephysics.media.core.VideoIO |
|---|
VideoIO.StreamPiper, VideoIO.VideoEnginePanel |
| Field Summary | |
|---|---|
protected static java.lang.String |
COMMA
|
protected static java.util.Map<java.lang.String,java.lang.String> |
customDelimiters
|
protected static java.lang.String |
defaultDelimiter
|
protected static java.lang.String |
delimiter
|
protected static java.util.Map<java.lang.String,java.lang.String> |
delimiters
|
protected static java.beans.PropertyChangeListener |
ffmpegListener
|
protected static boolean |
isffmpegError
|
protected static boolean |
loadInSeparateThread
|
protected static java.lang.String |
SEMICOLON
|
protected static java.lang.String |
SPACE
|
protected static java.lang.String |
TAB
|
protected static TFrame |
theFrame
|
protected static javax.swing.filechooser.FileFilter |
trkFileFilter
|
protected static javax.swing.filechooser.FileFilter |
videoAndTrkFileFilter
|
protected static javax.swing.filechooser.FileFilter |
zipFileFilter
|
| Fields inherited from class org.opensourcephysics.media.core.VideoIO |
|---|
canceled, chooser, defaultXMLExt, imageFileFilter, loadQTLast, singleVideoTypeFilters, VIDEO_EXTENSIONS, videoEnginePanel, videoEngines, videoFileFilter, videoTypes |
| Method Summary | |
|---|---|
static void |
addCustomDelimiter(java.lang.String custom)
Adds a custom delimiter to the collection of delimiters |
static boolean |
choose(XMLControl control,
ListChooser dialog)
Displays a ListChooser with choices from the specified control. |
static void |
copyImage(java.awt.Image image)
Copies the specified image to the system clipboard. |
static void |
copyTable(DataTable table,
boolean asFormatted,
java.lang.String header)
Copies data in the specified datatable to the system clipboard. |
static void |
copyXML(java.lang.Object obj)
Copies an xml string representation of the specified object to the system clipboard. |
static java.io.File |
exportFile(TrackerPanel trackerPanel)
Exports xml data from the specified tracker panel to a file selected with a chooser. |
protected static java.util.ArrayList<java.lang.Integer> |
findBadVideoFrames(TrackerPanel trackerPanel,
double tolerance,
boolean showWarning)
|
static java.io.File[] |
getChooserFiles(java.lang.String type)
Displays a file chooser and returns the chosen files. |
static java.awt.Image |
getClipboardImage()
Returns the image on the clipboard, if any. |
static java.lang.StringBuffer |
getData(DataTable table,
boolean asFormatted)
Gets the data selected by the user in a datatable. |
static java.lang.String |
getDelimiter()
Gets the delimiter for copied or exported data |
static Video |
getVideo(java.lang.String path,
VideoType vidType)
Returns a video from a specified path. |
static java.io.File |
importFile(TrackerPanel trackerPanel)
Imports xml data into a tracker panel from a file selected with a chooser. |
static void |
importVideo(java.io.File file,
TrackerPanel trackerPanel,
VideoType vidType)
Imports a video file to the specified tracker panel. |
static void |
importVideo(TrackerPanel trackerPanel)
Imports chooser-selected video to the specified tracker panel. |
static java.io.File[] |
insertImagesIntoVideo(java.io.File[] files,
TrackerPanel trackerPanel,
int startIndex)
Inserts file-based images into an ImageVideo on a TrackerPanel. |
static java.io.File[] |
insertImagesIntoVideo(TrackerPanel trackerPanel,
int startIndex)
Inserts chooser-selected images into an ImageVideo on a TrackerPanel. |
static void |
open(java.util.Collection<java.lang.String> urlPaths,
TFrame frame)
Loads a set of trk or video files into new TrackerPanels. |
static void |
open(java.io.File file,
TFrame frame)
Loads data or a video from a specified file into a new TrackerPanel. |
static void |
open(java.lang.String path,
TFrame frame)
Loads data or a video from a specified url into a TrackerPanel. |
static void |
open(java.net.URL url,
TFrame frame)
Loads data or a video from a specified url into a new TrackerPanel. |
static void |
pasteXML(TrackerPanel trackerPanel)
Pastes a new object into the specified tracker panel from an xml string on the system clipboard. |
static void |
removeCustomDelimiter(java.lang.String custom)
Removes a custom delimiter from the collection of delimiters |
static java.io.File |
save(java.io.File file,
TrackerPanel trackerPanel)
Writes TrackerPanel data to the specified file. |
static java.io.File |
saveTabset(java.io.File file,
TFrame frame)
Saves a tabset in the specified file. |
static void |
setDelimiter(java.lang.String delimiter)
Sets the delimiter for copied or exported data |
| Methods inherited from class org.opensourcephysics.media.core.VideoIO |
|---|
addVideoEngine, addVideoType, clone, copyFile, getChooser, getExtension, getRelativePath, getVideoExtensions, getVideoType, getVideoTypes, getVideoTypes, isCanceled, isQTPreferred, open, open, save, save, setCanceled, setDefaultXMLExtension, setQTLast, testExec, updateVideoType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String TAB
protected static final java.lang.String SPACE
protected static final java.lang.String COMMA
protected static final java.lang.String SEMICOLON
protected static javax.swing.filechooser.FileFilter zipFileFilter
protected static javax.swing.filechooser.FileFilter trkFileFilter
protected static javax.swing.filechooser.FileFilter videoAndTrkFileFilter
protected static java.lang.String defaultDelimiter
protected static java.lang.String delimiter
protected static java.util.Map<java.lang.String,java.lang.String> delimiters
protected static java.util.Map<java.lang.String,java.lang.String> customDelimiters
protected static boolean isffmpegError
protected static TFrame theFrame
protected static java.beans.PropertyChangeListener ffmpegListener
protected static boolean loadInSeparateThread
| Method Detail |
|---|
public static java.io.File save(java.io.File file,
TrackerPanel trackerPanel)
file - the file to write totrackerPanel - the TrackerPanel
public static java.io.File saveTabset(java.io.File file,
TFrame frame)
file - the file to write toframe - the TFrame
public static java.io.File[] getChooserFiles(java.lang.String type)
type - may be open, open video, save, insert image, export file,
import file, save tabset
public static Video getVideo(java.lang.String path,
VideoType vidType)
path - the pathvidType - a requested video type (may be null)
public static void open(java.io.File file,
TFrame frame)
file - the file to be loaded (may be null)frame - the frame for the TrackerPanel
public static void open(java.net.URL url,
TFrame frame)
url - the url to be loadedframe - the frame for the TrackerPanel
public static void open(java.util.Collection<java.lang.String> urlPaths,
TFrame frame)
urlPaths - an array of URL paths to be loadedframe - the frame for the TrackerPanels
public static void open(java.lang.String path,
TFrame frame)
url - the url to be loadedtrackerPanel - the TrackerPanelframe - the frame for the TrackerPanelpublic static java.io.File importFile(TrackerPanel trackerPanel)
trackerPanel - the tracker panel
public static void importVideo(TrackerPanel trackerPanel)
trackerPanel - the tracker panel
public static void importVideo(java.io.File file,
TrackerPanel trackerPanel,
VideoType vidType)
file - the video filetrackerPanel - the tracker panelvidType - the preferred video type
protected static java.util.ArrayList<java.lang.Integer> findBadVideoFrames(TrackerPanel trackerPanel,
double tolerance,
boolean showWarning)
public static java.io.File[] insertImagesIntoVideo(TrackerPanel trackerPanel,
int startIndex)
trackerPanel - the TrackerPanelstartIndex - the insertion index
public static java.io.File[] insertImagesIntoVideo(java.io.File[] files,
TrackerPanel trackerPanel,
int startIndex)
files - array of image filestrackerPanel - the TrackerPanelstartIndex - the insertion index
public static java.io.File exportFile(TrackerPanel trackerPanel)
trackerPanel - the tracker panel
public static boolean choose(XMLControl control,
ListChooser dialog)
control - the XMLControldialog - the dialog
true if OK button is clickedpublic static void copyXML(java.lang.Object obj)
obj - the object to copypublic static void pasteXML(TrackerPanel trackerPanel)
trackerPanel - the tracker panel
public static void copyTable(DataTable table,
boolean asFormatted,
java.lang.String header)
table - the datatable to copyasFormatted - true to retain table formattingpublic static void copyImage(java.awt.Image image)
image - the image to copypublic static java.awt.Image getClipboardImage()
public static java.lang.StringBuffer getData(DataTable table,
boolean asFormatted)
table - the datatable containing the dataasFormatted - true to retain table formatting
public static void setDelimiter(java.lang.String delimiter)
delimiter - the delimiterpublic static java.lang.String getDelimiter()
public static void addCustomDelimiter(java.lang.String custom)
custom - the delimiter to addpublic static void removeCustomDelimiter(java.lang.String custom)
custom - the delimiter to remove
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||