Class dnx.lr.node.DNXLoaderNode
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dnx.lr.node.DNXLoaderNode

java.lang.Object
   |
   +----dnx.util.DNXObject
           |
           +----dnx.lr.Node
                   |
                   +----dnx.lr.LeafNode
                           |
                           +----dnx.lr.node.DNXLoaderNode

public class DNXLoaderNode
extends LeafNode
 DNXLoader {
    eventIn      SFBool       loadURL         
    eventIn      SFBool       showDescription 
    exposedField SFString     description     ""
    exposedField MFString     parameter       []
    exposedField MFString     url             []
 }

This is a custom node specific to the Dimension X browser. In order to use it, you must specify an EXTERNPROTO, like this:

 EXTERNPROTO DNXLoader [
                         eventIn      SFBool       loadURL         
                         eventIn      SFBool       showDescription 
                         exposedField SFString     description
                         exposedField MFString     parameter
                         exposedField MFString     url
                       ]
 "urn:inet:dnx.com:lrnode:dnx.lr.node.DNXLoaderNode"
 

The DNXLoader node causes data to be fetched over the network whenever a loadURL event is received whose value is true. If the data pointed to is a VRML world, then that world is loaded and displayed instead of the world of which the DNXLoader is a part. If another data type is fetched, it is up to the browser to determine how to handle that data; typically, it will be passed to an appropriate, already-open (or newly spawned) general Web browser.

A DNXLoader with an empty ("") url does nothing when its children are chosen.

See the section "Concepts -URLs and URNs" for details on the url field.

The description field in the DNXLoader allows for a prompt to be displayed as an alternative to the URL in the url field. (This will be displayed when a showDescription eventIn is received with a value of true, and cleared when a showDescription eventIn is received with a value of false.) Ideally, browsers will allow the user to choose the description, the URL, or both to be displayed for a candidate DNXLoader.

The parameter exposed field may be used to supply any additional information to be interpreted by the VRML or HTML browser. Each string should consist of "keyword=value" pairs. For example, some browsers allow the specification of a 'target' for a link, to display a link in another part of the HTML document; the parameter field is then:

 DNXLoader {   parameter [
 "target=name_of_frame" ]   ... } 

An DNXLoader may be used to take the viewer to a particular viewpoint in a virtual world by specifying a URL ending with "#viewpointName", where "viewpointName" is the name of a viewpoint defined in the world. For example:

 DNXLoader {   url
 "http://www.school.edu/vrml/someScene.wrl#OverView"
 } 

specifies a DNXLoader that puts the viewer in the "someScene" world looking from the viewpoint named "OverView" when the node is activated. If no world is specified, then the current scene is implied; for example:

 DNXLoader {   url
 "#Doorway" } 

will take the viewer to the viewpoint defined by the "Doorway" viewpoint in the current world when the node is activated.


Variable Index

 o description
 o parameter
 o url

Constructor Index

 o DNXLoaderNode()

Method Index

 o createNodeDefinition(NodeDefinition)
Create the node definition.
 o handleEvent(SceneEvent)
Handle an event.
 o initFields()
Initialize field values.

Variables

 o description
  public SFString description
 o parameter
  public MFString parameter
 o url
  public MFString url

Constructors

 o DNXLoaderNode
  public DNXLoaderNode()

Methods

 o createNodeDefinition
  protected void createNodeDefinition(NodeDefinition def)
Create the node definition.
Overrides:
createNodeDefinition in class Node
 o initFields
  protected void initFields()
Initialize field values.
Overrides:
initFields in class Node
 o handleEvent
  protected void handleEvent(SceneEvent ev)
Handle an event.
Overrides:
handleEvent in class Node

All Packages  Class Hierarchy  This Package  Previous  Next  Index