Class SpreadSheetExporter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.debug.objectexport.AbstractObjectExporter
-
- adams.gui.visualization.debug.objectexport.SpreadSheetExporter
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,FileFormatHandler
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
public class SpreadSheetExporter extends AbstractObjectExporter
Exports spreadsheet objects.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SpreadSheetWriter
m_Writer
the writer to use.-
Fields inherited from class adams.gui.visualization.debug.objectexport.AbstractObjectExporter
m_ExporterClasses, m_Exporters
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description SpreadSheetExporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected String
doExport(Object obj, File file)
Performs the actual export.String
getFormatDescription()
Returns a string describing the format (used in the file chooser).String[]
getFormatExtensions()
Returns the extension(s) of the format.SpreadSheetWriter
getWriter()
Returns the spreadsheet writer to use.boolean
handles(Class cls)
Checks whether the exporter can handle the specified class.void
setWriter(SpreadSheetWriter value)
Sets the spreadsheet writer to use.String
writerTipText()
Returns the tip text for this property.-
Methods inherited from class adams.gui.visualization.debug.objectexport.AbstractObjectExporter
export, getDefaultFormatExtension, getExporters, getExporters, getExporters, getExporters, getExporters, globalInfo, initExporters, instantiate
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Writer
protected SpreadSheetWriter m_Writer
the writer to use.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setWriter
public void setWriter(SpreadSheetWriter value)
Sets the spreadsheet writer to use.- Parameters:
value
- the writer
-
getWriter
public SpreadSheetWriter getWriter()
Returns the spreadsheet writer to use.- Returns:
- the writer
-
writerTipText
public String writerTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
getFormatDescription
public String getFormatDescription()
Returns a string describing the format (used in the file chooser).- Specified by:
getFormatDescription
in interfaceFileFormatHandler
- Specified by:
getFormatDescription
in classAbstractObjectExporter
- Returns:
- a description suitable for displaying in the file chooser
-
getFormatExtensions
public String[] getFormatExtensions()
Returns the extension(s) of the format.- Specified by:
getFormatExtensions
in interfaceFileFormatHandler
- Specified by:
getFormatExtensions
in classAbstractObjectExporter
- Returns:
- the extension (without the dot!)
-
handles
public boolean handles(Class cls)
Checks whether the exporter can handle the specified class.- Specified by:
handles
in classAbstractObjectExporter
- Parameters:
cls
- the class to check- Returns:
- true if the exporter can handle this type of object
-
doExport
protected String doExport(Object obj, File file)
Performs the actual export.- Specified by:
doExport
in classAbstractObjectExporter
- Parameters:
obj
- the object to exportfile
- the file to export to- Returns:
- null if successful, otherwise error message
-
-