Package adams.core.gnuplot
Class Initialize
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.core.gnuplot.AbstractScriptlet
-
- adams.core.gnuplot.Initialize
-
- All Implemented Interfaces:
adams.core.Destroyable,adams.core.ErrorProvider,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.QuickInfoSupporter,adams.core.SizeOfHandler,Serializable
public class Initialize extends AbstractScriptlet
Initializes the plotting.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-terminal <java.lang.String> (property: terminal) The terminal to use: e.g., 'x11', 'gif', 'png', 'svg'; for any terminal type apart from 'x11', an output file needs to be supplied. default: x11
-output <adams.core.io.PlaceholderFile> (property: outputFile) The output file to use if terminal other than 'x11' is used. default: ${CWD}-title <java.lang.String> (property: title) The title to use for the plot. default:
-x-label <java.lang.String> (property: XLabel) The title for the X axis; gets ignored if empty. default:
-y-label <java.lang.String> (property: YLabel) The title for the Y axis; gets ignored if empty. default:
-z-label <java.lang.String> (property: ZLabel) The title for the Z axis; gets ignored if empty. default:
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.core.io.PlaceholderFilem_OutputFilethe output file if not 'x11' as terminal.protected Stringm_Terminalthe terminal to use.protected Stringm_Titlethe plot title.protected Stringm_XLabelthe title of the X axis.protected Stringm_YLabelthe title of the Y axis.protected Stringm_ZLabelthe title of the Z axis.static StringTERMINAL_X11the 'x11' terminal.-
Fields inherited from class adams.core.gnuplot.AbstractScriptlet
COMMENT, m_LastError, m_Owner
-
-
Constructor Summary
Constructors Constructor Description Initialize()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcheck()Hook method for performing checks.voiddefineOptions()Adds options to the internal list of options.protected StringdoGenerate()Generates the actual script code.adams.core.io.PlaceholderFilegetOutputFile()Returns the output file in use (if not x11 as terminal).StringgetQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.StringgetTerminal()Returns the terminal to use.StringgetTitle()Returns the title to use.StringgetXLabel()Returns the title for the X axis.StringgetYLabel()Returns the title for the Y axis.StringgetZLabel()Returns the title for the Z axis.StringglobalInfo()Returns a string describing the object.StringoutputFileTipText()Returns the tip text for this property.voidsetOutputFile(adams.core.io.PlaceholderFile value)Sets the output file to use (if not x11 as terminal).voidsetTerminal(String value)Sets the terminal to use.voidsetTitle(String value)Sets the title to use.voidsetXLabel(String value)Sets the title for the X axis.voidsetYLabel(String value)Sets the title for the Y axis.voidsetZLabel(String value)Sets the title for the Z axis.StringterminalTipText()Returns the tip text for this property.StringtitleTipText()Returns the tip text for this property.StringXLabelTipText()Returns the tip text for this property.StringYLabelTipText()Returns the tip text for this property.StringZLabelTipText()Returns the tip text for this property.-
Methods inherited from class adams.core.gnuplot.AbstractScriptlet
generate, getLastError, getOwner, hasLastError, reset, setOwner
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
TERMINAL_X11
public static final String TERMINAL_X11
the 'x11' terminal.- See Also:
- Constant Field Values
-
m_Terminal
protected String m_Terminal
the terminal to use.
-
m_OutputFile
protected adams.core.io.PlaceholderFile m_OutputFile
the output file if not 'x11' as terminal.
-
m_Title
protected String m_Title
the plot title.
-
m_XLabel
protected String m_XLabel
the title of the X axis.
-
m_YLabel
protected String m_YLabel
the title of the Y axis.
-
m_ZLabel
protected String m_ZLabel
the title of the Z axis.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.core.option.AbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classadams.core.option.AbstractOptionHandler
-
setTerminal
public void setTerminal(String value)
Sets the terminal to use.- Parameters:
value- the terminal type
-
getTerminal
public String getTerminal()
Returns the terminal to use.- Returns:
- the terminal type
-
terminalTipText
public String terminalTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setOutputFile
public void setOutputFile(adams.core.io.PlaceholderFile value)
Sets the output file to use (if not x11 as terminal).- Parameters:
value- the output file
-
getOutputFile
public adams.core.io.PlaceholderFile getOutputFile()
Returns the output file in use (if not x11 as terminal).- Returns:
- the output file
-
outputFileTipText
public String outputFileTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setTitle
public void setTitle(String value)
Sets the title to use.- Parameters:
value- the title type
-
getTitle
public String getTitle()
Returns the title to use.- Returns:
- the title type
-
titleTipText
public String titleTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setXLabel
public void setXLabel(String value)
Sets the title for the X axis.- Parameters:
value- the title
-
getXLabel
public String getXLabel()
Returns the title for the X axis.- Returns:
- the title
-
XLabelTipText
public String XLabelTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setYLabel
public void setYLabel(String value)
Sets the title for the Y axis.- Parameters:
value- the title
-
getYLabel
public String getYLabel()
Returns the title for the Y axis.- Returns:
- the title
-
YLabelTipText
public String YLabelTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setZLabel
public void setZLabel(String value)
Sets the title for the Z axis.- Parameters:
value- the title
-
getZLabel
public String getZLabel()
Returns the title for the Z axis.- Returns:
- the title
-
ZLabelTipText
public String ZLabelTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
check
public String check()
Hook method for performing checks.
Makes sure that the output file (if terminal is not x11) is not a directory.- Overrides:
checkin classAbstractScriptlet- Returns:
- null if all checks passed, otherwise error message
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfoin interfaceadams.core.QuickInfoSupporter- Overrides:
getQuickInfoin classAbstractScriptlet- Returns:
- null if no info available, otherwise short string
-
doGenerate
protected String doGenerate()
Generates the actual script code.- Specified by:
doGeneratein classAbstractScriptlet- Returns:
- the script code, null in case of an error
-
-