ewe.sys
Class JavaBridge

java.lang.Object
  extended byewe.sys.JavaBridge

public class JavaBridge
extends Object


Constructor Summary
JavaBridge()
           
 
Method Summary
static Object createEweObject(Object javaObject)
          Create a Ewe Object that is the equivalent of a Java Object.
static Object[] getNativeFileChooser()
          This method returns a native file dialog box and a Task that can be used to execute the file dialog using runNativeDialog(), or null if none is available on the current platform.
static Task makeBlockingTask(CallBack cb)
          Create a Task that can call a full system blocking method without blocking the VM.
static Handle runNativeDialog(Task nativeDialogTask)
          Run a task that will display a native dialog box of some kind while it runs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, toString
 

Constructor Detail

JavaBridge

public JavaBridge()
Method Detail

makeBlockingTask

public static Task makeBlockingTask(CallBack cb)
Create a Task that can call a full system blocking method without blocking the VM. Under a native Ewe VM this is not possible and this will still block the VM, but under a Java VM the Ewe VM will not be blocked.

The task should be implemented in a CallBack Object, where the callBack(Object data) method will hold the blocking code and the "data" parameter will be a Handle that the task can use to set the status of the task.

This method calls the method of the same name in ewe.sys.Vm.


runNativeDialog

public static Handle runNativeDialog(Task nativeDialogTask)
Run a task that will display a native dialog box of some kind while it runs. The method returns immediately, returning the Handle of the nativeDialogTask.

This method calls the method of the same name in ewe.sys.Vm.


getNativeFileChooser

public static Object[] getNativeFileChooser()
This method returns a native file dialog box and a Task that can be used to execute the file dialog using runNativeDialog(), or null if none is available on the current platform.

The second object in the returned array is always a Task object for running the native file dialog box.

Under a Java 1.2 system, a javax.swing.JFileChooser is returned as the first object in the returned array. Under a Java 1.1 system, a java.awt.FileDialog is returned as the first object in the array.


createEweObject

public static Object createEweObject(Object javaObject)
Create a Ewe Object that is the equivalent of a Java Object.

The Objects that can be converted are:

Any other type of object will throw an IllegalArgumentException