ecologylab.services.logging.playback
Class LogPlayer<OP extends MixedInitiativeOp,LOG extends Logging<OP>>
java.lang.Object
ecologylab.generic.Debug
ecologylab.appframework.ApplicationEnvironment
ecologylab.services.logging.playback.LogPlayer<OP,LOG>
- All Implemented Interfaces:
- Environment, PlaybackControlCommands, XMLTranslationExceptionTypes, java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener
public abstract class LogPlayer<OP extends MixedInitiativeOp,LOG extends Logging<OP>>
- extends ApplicationEnvironment
- implements java.awt.event.ActionListener, java.awt.event.WindowListener, PlaybackControlCommands, java.lang.Runnable
The main application for playing back log files.
- Author:
- Zachary O. Toups (toupsz@cs.tamu.edu)
| Methods inherited from class ecologylab.appframework.ApplicationEnvironment |
assetsDownloadProcessor, browser, codeBase, createPrefsEditor, createPrefsEditor, docBase, exit, launchType, lookupElementStatePreference, lookupStringPreference, metaPrefSet, navigate, preferencesDir, preferencesFileRelativeFromArg0, preferencesRegistry, prefSet, runtimeEnv, setCodeBase, showStatus, status, translationSpace |
| Methods inherited from class ecologylab.generic.Debug |
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, getClassName, getInteractive, getPackageName, getPackageName, getPackageName, initialize, level, level, level, logToFile, print, print, println, println, println, println, println, println, printlnA, printlnA, printlnA, printlnI, printlnI, printlnI, printlnI, setLoggingFile, show, show, superString, toggleInteractive, toString, toString, warning, warning, weird, weird |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
controlsDisplay
protected LogPlaybackControls<OP extends MixedInitiativeOp,LOG extends Logging<OP>> controlsDisplay
logDisplay
protected View<OP extends MixedInitiativeOp> logDisplay
log
protected LogPlaybackControlModel<OP extends MixedInitiativeOp,LOG extends Logging<OP>> log
mainFrame
protected javax.swing.JFrame mainFrame
t
protected javax.swing.Timer t
translationSpace
protected TranslationSpace translationSpace
DEFAULT_PLAYBACK_INTERVAL
public static final int DEFAULT_PLAYBACK_INTERVAL
- See Also:
- Constant Field Values
TIMESTAMP_PLAYBACK_INTERVAL
public static final int TIMESTAMP_PLAYBACK_INTERVAL
- See Also:
- Constant Field Values
playbackInterval
protected int playbackInterval
- The number of milliseconds between ops when the log is playing. Setting to -1 will try to use op timestamps.
LogPlayer
public LogPlayer(java.lang.String appName,
java.lang.String[] args,
TranslationSpace translationSpace)
throws XMLTranslationException
- Throws:
XMLTranslationException
generateLogPlaybackControlModel
protected abstract LogPlaybackControlModel<OP,LOG> generateLogPlaybackControlModel(LOG incomingLog)
generateView
protected abstract View<OP> generateView()
generateLogPlaybackControls
protected abstract LogPlaybackControls<OP,LOG> generateLogPlaybackControls()
translateXMLFromFile
protected abstract LOG translateXMLFromFile(java.io.File logToRead)
throws XMLTranslationException
- Translates the given file to XML. Necessary because it is not possible to cast directly to generic types.
- Parameters:
logToRead -
- Returns:
-
- Throws:
XMLTranslationException
readInXMLFile
protected LOG readInXMLFile(java.io.File logToRead)
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
addActionListener
public void addActionListener(java.awt.event.ActionListener l)
showLogPlaybackGUI
public void showLogPlaybackGUI()
showFileSelectGUI
public void showFileSelectGUI()
run
public void run()
- Used to be thread safe with Swing. Either sets up the UI, or switches it, depending on whether or not a file has
been selected.
- Specified by:
run in interface java.lang.Runnable
- See Also:
Runnable.run()
startProgram
public void startProgram()
windowActivated
public void windowActivated(java.awt.event.WindowEvent e)
- Specified by:
windowActivated in interface java.awt.event.WindowListener
windowClosed
public void windowClosed(java.awt.event.WindowEvent e)
- Specified by:
windowClosed in interface java.awt.event.WindowListener
windowClosing
public void windowClosing(java.awt.event.WindowEvent e)
- Sends the server notification that we are logging-out, then shuts down the program.
- Specified by:
windowClosing in interface java.awt.event.WindowListener
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent e)
- Specified by:
windowDeactivated in interface java.awt.event.WindowListener
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent e)
- Specified by:
windowDeiconified in interface java.awt.event.WindowListener
windowIconified
public void windowIconified(java.awt.event.WindowEvent e)
- Specified by:
windowIconified in interface java.awt.event.WindowListener
windowOpened
public void windowOpened(java.awt.event.WindowEvent e)
- Specified by:
windowOpened in interface java.awt.event.WindowListener