Artenus 2D Framework
Artenus Reference
Provides a scripting console interface. You can type in commands and request execution. The request will be passed to the ScriptHost object for processing. To use this interface, you must declare ConsoleActivity as an activity in AndroidManifest.xml.
public class ConsoleActivity
extends Activity

Constructor Summary

Modifier and TypeConstructor and Description
public ConsoleActivity()

Method Summary

Modifier and TypeMethod and Description
public static voidcloseConsole()
Closes the console window.
public static StringgetScript()
Gets the script currently showing on the editor.
protected voidonCreate(Bundle savedInstanceState)
protected voidonDestroy()
public static voidopenConsole(Context context, ScriptHost host)
Opens a console window with the given script host.
public static voidsetScript(String script)
Sets the script showing on the editor.

Methods inherited from java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ConsoleActivity
public  ConsoleActivity()

Method Detail

closeConsole
public static void closeConsole()
Closes the console window.
getScript
public static String getScript()
Gets the script currently showing on the editor.
Returns:
The script text
onCreate
protected void onCreate(
    Bundle savedInstanceState
)
onDestroy
protected void onDestroy()
openConsole
public static void openConsole(
    Context context,
    ScriptHost host
)
Opens a console window with the given script host.
Parameters:
contextApplication context
hostThe script host interpreting scripts
See Also:
setScript
public static void setScript(
    String script
)
Sets the script showing on the editor.
Parameters:
scriptThe script code