Package org.eclipse.birt.chart.device

# Class ScriptMenuHelper

java.lang.Object
org.eclipse.birt.chart.device.ScriptMenuHelper

All Implemented Interfaces:
  `IScriptMenuHelper`

public class ScriptMenuHelper extends Object implements IScriptMenuHelper
The helper class is used to generate scripts for Action Value of chart model.

Since:
  2.5.2

## Constructor Summary

Constructors
Constructor
Description
`ScriptMenuHelper()`

## Method Summary

Modifier and Type
Method
Description
`String`
`getScriptValueJS(int index, ScriptValue sv, com.ibm.icu.util.ULocale locale)`
Returns scripts of 'Invoke Script' action.
`static void`
`initInstance(IScriptMenuHelper tFactory)`
Initializes instance of this object.
`static IScriptMenuHelper`
`instance()`
Returns instance of this object.
`static String`
`wrapScriptsAsFunction(String script)`
Wraps specified script into a function for the calling by using eval function.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ScriptMenuHelper

public ScriptMenuHelper()

## Method Details

### initInstance

public static void initInstance(IScriptMenuHelper tFactory)
Initializes instance of this object.

Parameters:
  `tFactory` -

### instance

public static IScriptMenuHelper instance()
Returns instance of this object.

Returns:
  IScriptMenuHelper instance

### getScriptValueJS

public String getScriptValueJS(int index, ScriptValue sv, com.ibm.icu.util.ULocale locale)
Description copied from interface: `IScriptMenuHelper`
Returns scripts of 'Invoke Script' action.

Specified by:
  `getScriptValueJS` in interface `IScriptMenuHelper`
Parameters:
  `index` - index of action.
  `sv` - script action.
Returns:
  string script value js

### wrapScriptsAsFunction

public static String wrapScriptsAsFunction(String script)
Wraps specified script into a function for the calling by using eval function.

Parameters:
  `script` -
Returns:
  string script