org.opensourcephysics.cabrillo.tracker
Class Tracker

java.lang.Object
  extended by org.opensourcephysics.cabrillo.tracker.Tracker

public class Tracker
extends java.lang.Object

This is the default Tracker application.

Author:
Douglas Brown

Field Summary
protected static java.util.Locale[] locales
           
static javax.swing.ImageIcon TRACKER_ICON
          the tracker icon
 
Constructor Summary
Tracker()
          Constructs Tracker with a blank tab.
Tracker(Video video)
          Constructs Tracker with a video.
 
Method Summary
protected static void addRecent(java.lang.String filename, boolean atEnd)
          Adds a path to the list of recent files.
protected static boolean areEqual(java.util.Set<?> set1, java.util.Set<?> set2)
          Determines if two sets contain the same elements.
protected static void createActions()
          Creates the actions.
protected static java.util.Set<java.lang.String> getDefaultConfig()
          Gets the default set of configuration properties.
 TFrame getFrame()
          Gets the frame.
protected static java.util.Set<java.lang.String> getFullConfig()
          Gets the full set of configuration properties.
static Tracker getTracker()
          Gets the shared Tracker for single-VM use.
protected static java.awt.Cursor getZoomInCursor()
          Gets the zoomInCursor.
protected static java.awt.Cursor getZoomOutCursor()
          Gets the zoomOutCursor.
protected  boolean load(java.lang.String name, int tab)
          Loads the named xml file into the specified tab.
protected static void loadCurrentVersion(boolean ignoreInterval)
           
protected static void loadPreferences()
          Loads preferences from a preferences file, if any.
protected static void logTime(java.lang.String message)
          Logs the current time (to milliseconds) with a message.
static void main(java.lang.String[] args)
          Main entry point when used as application.
protected static void relaunch(TFrame frame, int memorySize, java.lang.String javaPath)
          Attempts to relaunch Tracker with a specified memory size.
protected static java.lang.String savePreferences()
          Saves the current preferences.
protected static void setCache(java.lang.String cachePath)
          Sets the cache path.
protected static void setDefaultConfig(java.util.Set<java.lang.String> config)
          Sets the default set of configuration properties.
protected static void setPreferredLocale(java.lang.String localeName)
          Sets the preferred locale.
protected static void setProgress(int progress)
          Sets the progress in percent for splash display.
protected static void setRecentSize(int max)
          Sets the maximum size of the recent files list.
protected static void splash(java.lang.String message)
          Displays a message in the splash screen.
protected static boolean updateResources()
          Checks and updates QuickTime and other system resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACKER_ICON

public static final javax.swing.ImageIcon TRACKER_ICON
the tracker icon


locales

protected static java.util.Locale[] locales
Constructor Detail

Tracker

public Tracker()
Constructs Tracker with a blank tab.


Tracker

public Tracker(Video video)
Constructs Tracker with a video.

Parameters:
video - the video
Method Detail

getTracker

public static Tracker getTracker()
Gets the shared Tracker for single-VM use.

Returns:
the tracker panel

getFrame

public TFrame getFrame()
Gets the frame.

Returns:
the frame

load

protected boolean load(java.lang.String name,
                       int tab)
Loads the named xml file into the specified tab.

Parameters:
name - the name of the xml file
tab - the tab number
Returns:
true if the xml file successfully loaded

createActions

protected static void createActions()
Creates the actions.


relaunch

protected static void relaunch(TFrame frame,
                               int memorySize,
                               java.lang.String javaPath)
Attempts to relaunch Tracker with a specified memory size.

Parameters:
frame - a TFrame
memorySize - the desired memory size

getFullConfig

protected static java.util.Set<java.lang.String> getFullConfig()
Gets the full set of configuration properties.

Returns:
the full configuration set

getDefaultConfig

protected static java.util.Set<java.lang.String> getDefaultConfig()
Gets the default set of configuration properties.

Returns:
the default configuration set

setDefaultConfig

protected static void setDefaultConfig(java.util.Set<java.lang.String> config)
Sets the default set of configuration properties.

Parameters:
config - a set of configuration properties

setPreferredLocale

protected static void setPreferredLocale(java.lang.String localeName)
Sets the preferred locale.

Parameters:
localeName - the name of the locale

setCache

protected static void setCache(java.lang.String cachePath)
Sets the cache path.

Parameters:
cachePath - the cache path

updateResources

protected static boolean updateResources()
Checks and updates QuickTime and other system resources.

Returns:
true if any resources were updated

areEqual

protected static boolean areEqual(java.util.Set<?> set1,
                                  java.util.Set<?> set2)
Determines if two sets contain the same elements.

Returns:
true if the sets are equal

loadCurrentVersion

protected static void loadCurrentVersion(boolean ignoreInterval)

loadPreferences

protected static void loadPreferences()
Loads preferences from a preferences file, if any.


savePreferences

protected static java.lang.String savePreferences()
Saves the current preferences.


getZoomInCursor

protected static java.awt.Cursor getZoomInCursor()
Gets the zoomInCursor.

Returns:
the cursor

getZoomOutCursor

protected static java.awt.Cursor getZoomOutCursor()
Gets the zoomOutCursor.

Returns:
the cursor

main

public static void main(java.lang.String[] args)
Main entry point when used as application.

Parameters:
args - array of tracker or video file names

splash

protected static void splash(java.lang.String message)
Displays a message in the splash screen.


setProgress

protected static void setProgress(int progress)
Sets the progress in percent for splash display.

Parameters:
progress - a number from 0 (start) to 100 (done)

logTime

protected static void logTime(java.lang.String message)
Logs the current time (to milliseconds) with a message.


addRecent

protected static void addRecent(java.lang.String filename,
                                boolean atEnd)
Adds a path to the list of recent files.

Parameters:
filename - the absolute path to a recently opened or saved file.

setRecentSize

protected static void setRecentSize(int max)
Sets the maximum size of the recent files list. Limited to 12 or less.

Parameters:
max - the desired maximum size.