Class RollingStockLogger
- java.lang.Object
-
- jmri.jmrit.XmlFile
-
- jmri.jmrit.operations.rollingstock.RollingStockLogger
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.util.EventListener
,InstanceManagerAutoDefault
public class RollingStockLogger extends XmlFile implements InstanceManagerAutoDefault, java.beans.PropertyChangeListener
Logs rolling stock movements by writing their locations to a file.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.jmrit.XmlFile
XmlFile.Validate
-
-
Field Summary
-
Fields inherited from class jmri.jmrit.XmlFile
dtdLocation, xsltLocation
-
-
Constructor Summary
Constructors Constructor Description RollingStockLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
void
enableCarLogging(boolean enable)
void
enableEngineLogging(boolean enable)
java.lang.String
getDirectoryName()
java.lang.String
getFileName()
java.lang.String
getFullLoggerFileName()
java.lang.String
getFullLoggerFileName(RollingStock rs)
Individual files for each rolling stock stored in a directory called "rollingStock" inside the "logger" directory.void
propertyChange(java.beans.PropertyChangeEvent e)
void
setDirectoryName(java.lang.String name)
-
Methods inherited from class jmri.jmrit.XmlFile
addDefaultInfo, backupFileName, checkFile, createFileNameWithDate, dumpElement, findFile, getBuilder, getDefaultDtdLocation, getDefaultValidate, getDtdLocation, getProcessingInstructionHRef, getProcessingInstructionType, getRoot, getValidate, makeBackupFile, makeBackupFile, newDocument, newDocument, revertBackupFile, rootFromFile, rootFromInputStream, rootFromName, rootFromURL, setDefaultDtdLocation, setDefaultValidate, setDtdLocation, setValidate, userFileChooser, userFileChooser, writeXML, xmlDir
-
-
-
-
Constructor Detail
-
RollingStockLogger
public RollingStockLogger()
-
-
Method Detail
-
enableCarLogging
public void enableCarLogging(boolean enable)
-
enableEngineLogging
public void enableEngineLogging(boolean enable)
-
getFullLoggerFileName
public java.lang.String getFullLoggerFileName()
-
getDirectoryName
public java.lang.String getDirectoryName()
-
setDirectoryName
public void setDirectoryName(java.lang.String name)
-
getFileName
public java.lang.String getFileName()
-
getFullLoggerFileName
public java.lang.String getFullLoggerFileName(RollingStock rs)
Individual files for each rolling stock stored in a directory called "rollingStock" inside the "logger" directory.- Parameters:
rs
- The RollingStock to log.- Returns:
- Full path name of log file.
-
dispose
public void dispose()
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
-