Class 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 Detail

      • 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.
    • Constructor Detail

      • Initialize

        public Initialize()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.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 interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.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 class AbstractScriptlet
        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 interface adams.core.QuickInfoSupporter
        Overrides:
        getQuickInfo in class AbstractScriptlet
        Returns:
        null if no info available, otherwise short string
      • doGenerate

        protected String doGenerate()
        Generates the actual script code.
        Specified by:
        doGenerate in class AbstractScriptlet
        Returns:
        the script code, null in case of an error