jaitools.demo.jiffle
Class JiffleExecutorDemo
java.lang.Object
jaitools.demo.jiffle.JiffleDemoBase
jaitools.demo.jiffle.JiffleExecutorDemo
public class JiffleExecutorDemo
- extends JiffleDemoBase
Demonstrates the use of JiffleExecutor to run a script.
There are two options for running a Jiffle script...
- Directly, by getting a
JiffleRuntime object
from the compiled Jiffle object.
- Indirectly, by submitting a Jiffle object to a
JiffleExecutor.
The advantage of the second method for computationally demanding tasks
is that execution is carried out in a separate thread. The caller is informed
about completion or failure via JiffleEvents and can track progress
using a JiffleProgressListener.
- Since:
- 1.1
- Version:
- $Id: JiffleExecutorDemo.java 1639 2011-04-06 03:20:36Z michael.bedward $
- Author:
- Michael Bedward
|
Method Summary |
void |
compileAndRun(File scriptFile)
Compiles a script read from a file and submits it for execution. |
static void |
main(String[] args)
Run the demonstration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JiffleExecutorDemo
public JiffleExecutorDemo()
- Constructor. Creates an instance of
JiffleExecutor
and sets up event handling.
main
public static void main(String[] args)
throws Exception
- Run the demonstration. The optional
arg can be either
the path to a user-supplied script or one of "chessboard",
"interference", "ripple" or "squircle".
- Parameters:
args - (optional) the script to run
- Throws:
Exception - on problems compiling the script
compileAndRun
public void compileAndRun(File scriptFile)
throws Exception
- Compiles a script read from a file and submits it for execution.
- Parameters:
scriptFile - file containing the Jiffle script
- Throws:
Exception - on problems compiling the script
Copyright © 2011. All Rights Reserved.