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.PlaceholderFile
m_OutputFile
the output file if not 'x11' as terminal.protected String
m_Terminal
the terminal to use.protected String
m_Title
the plot title.protected String
m_XLabel
the title of the X axis.protected String
m_YLabel
the title of the Y axis.protected String
m_ZLabel
the title of the Z axis.static String
TERMINAL_X11
the '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 String
check()
Hook method for performing checks.void
defineOptions()
Adds options to the internal list of options.protected String
doGenerate()
Generates the actual script code.adams.core.io.PlaceholderFile
getOutputFile()
Returns the output file in use (if not x11 as terminal).String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.String
getTerminal()
Returns the terminal to use.String
getTitle()
Returns the title to use.String
getXLabel()
Returns the title for the X axis.String
getYLabel()
Returns the title for the Y axis.String
getZLabel()
Returns the title for the Z axis.String
globalInfo()
Returns a string describing the object.String
outputFileTipText()
Returns the tip text for this property.void
setOutputFile(adams.core.io.PlaceholderFile value)
Sets the output file to use (if not x11 as terminal).void
setTerminal(String value)
Sets the terminal to use.void
setTitle(String value)
Sets the title to use.void
setXLabel(String value)
Sets the title for the X axis.void
setYLabel(String value)
Sets the title for the Y axis.void
setZLabel(String value)
Sets the title for the Z axis.String
terminalTipText()
Returns the tip text for this property.String
titleTipText()
Returns the tip text for this property.String
XLabelTipText()
Returns the tip text for this property.String
YLabelTipText()
Returns the tip text for this property.String
ZLabelTipText()
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:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in 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:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in 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:
check
in 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:
getQuickInfo
in interfaceadams.core.QuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractScriptlet
- Returns:
- null if no info available, otherwise short string
-
doGenerate
protected String doGenerate()
Generates the actual script code.- Specified by:
doGenerate
in classAbstractScriptlet
- Returns:
- the script code, null in case of an error
-
-