multivalent.devel

Class Embed

public final class Embed extends Object

Source code demonstrates how to embed the browser into other applications, at different levels. Ways of embedding: external process, local JVM, Swing component, document tree data structure as described in MediaAdaptor. (NOT as an applet.) Applications should add the Multivalent.jar JAR to the CLASSPATH, rather than try to figure out what subset of the classes are needed, so that updating to new versions of Multivalent is easy (the JAR is tiny anyhow).

This class can be run to see the code working, but it's mainly useful for the demonstrations in source code.

Version: $Revision: 1.3 $ $Date: 2003/06/02 05:14:12 $

Method Summary
static voidexternal()
Launches a browser from as an independent process from a non-Java program, and sends the browser commands over a socket.
static voidlocal()
Creates a new browser window within the same JVM, and communicates with semantic events on the Java event queue.
static voidmain(String[] argv)
Demos embedding in Swing-based application.
static voidswing()
Creates a browser window as part of a Swing-based application, and uses a different hub document to do without menubar and toolbar.

Method Detail

external

public static void external()
Launches a browser from as an independent process from a non-Java program, and sends the browser commands over a socket. Commands are limited to those semantic events that can be represented as strings, but this is sufficient to show documents of any type and go from page to page. Obviously this shows Java code that should be translated into the equivalent in another language.

See Also: RemoteControl

local

public static void local()
Creates a new browser window within the same JVM, and communicates with semantic events on the Java event queue. The full set of semantic events are available.

main

public static void main(String[] argv)
Demos embedding in Swing-based application.

swing

public static void swing()
Creates a browser window as part of a Swing-based application, and uses a different hub document to do without menubar and toolbar.