adams.core.gnuplot
Class CustomScriptlet

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.core.gnuplot.AbstractScriptlet
              extended by adams.core.gnuplot.CustomScriptlet
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, SizeOfHandler, Serializable

public class CustomScriptlet
extends AbstractScriptlet

Allows the user to enter a custom Gnuplot script snippet.

Valid options are:

-D <int> (property: debugLevel)
    The greater the number the more additional info the scheme may output to
    the console (0 = off).
    default: 0
    minimum: 0
 
-script <adams.core.base.BaseText> (property: script)
    The custom script code.
    default:
 

Version:
$Revision: 4584 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  BaseText m_Script
          the custom script code.
 
Fields inherited from class adams.core.gnuplot.AbstractScriptlet
COMMENT, m_DataFile, m_LastError
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
CustomScriptlet()
           
 
Method Summary
 void defineOptions()
          Adds options to the internal list of options.
protected  String doGenerate()
          Generates the actual script code.
 BaseText getScript()
          Returns the script code.
 String globalInfo()
          Returns a string describing the object.
 String scriptTipText()
          Returns the tip text for this property.
 void setScript(BaseText value)
          Sets the script code.
 
Methods inherited from class adams.core.gnuplot.AbstractScriptlet
check, dataFileTipText, generate, getDataFile, getLastError, hasLastError, reset, setDataFile
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_Script

protected BaseText m_Script
the custom script code.

Constructor Detail

CustomScriptlet

public CustomScriptlet()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class 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 OptionHandler
Overrides:
defineOptions in class AbstractScriptlet

setScript

public void setScript(BaseText value)
Sets the script code.

Parameters:
value - the code

getScript

public BaseText getScript()
Returns the script code.

Returns:
the code

scriptTipText

public String scriptTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

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


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.