Xj3D 2.0 VRML/X3D Code API

vrml.eai.event
Class BrowserEvent

java.lang.Object
  extended by vrml.eai.event.BrowserEvent

public class BrowserEvent
extends java.lang.Object

Class representing events that happen to the VRML browser.

This event notifies listener classes about changes to the browser that may be of interest to the client. VRML events cannot be consumed in the way that java AWT events can be.

Version:
1.1 3 August 1998

Field Summary
static int CONNECTION_ERROR
          An error has occured that has caused the connection between the browser and the external application to fail.
static int INITIALIZED
          The browser has completed the initial loading of the world.
static int LAST_IDENTIFIER
          The number of reserved identifier numbers for event conditions.
static int SHUTDOWN
          The currently loaded world is about to be unloaded.
static int URL_ERROR
          An error occurred in loading VRML from a URL call.
 
Constructor Summary
BrowserEvent(Browser b, int action)
          Create a new browser event.
 
Method Summary
 int getID()
          Get the type of event that has occurred.
 Browser getSource()
          Get the source of this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIALIZED

public static final int INITIALIZED
The browser has completed the initial loading of the world. Event is generated just after the scene has been loaed and just before the first event has been sent

See Also:
Constant Field Values

SHUTDOWN

public static final int SHUTDOWN
The currently loaded world is about to be unloaded. Called just before the scene is about to be unloaded. If another world is to replace this, then an initialize event will be generated following this one.

See Also:
Constant Field Values

URL_ERROR

public static final int URL_ERROR
An error occurred in loading VRML from a URL call. Source could be either a createVrmlFromURL call or loadURL.

See Also:
Constant Field Values

CONNECTION_ERROR

public static final int CONNECTION_ERROR
An error has occured that has caused the connection between the browser and the external application to fail. This may be the VRML browser crashing, or a network connection falling over.

See Also:
Constant Field Values

LAST_IDENTIFIER

public static final int LAST_IDENTIFIER
The number of reserved identifier numbers for event conditions. Any value below this is considered to be a general VRML defined event as specified in the External Authoring Interface specification. Any values above this are browser specific messages.

See Also:
Constant Field Values
Constructor Detail

BrowserEvent

public BrowserEvent(Browser b,
                    int action)
Create a new browser event.

Parameters:
b - The source of the browser that generated this event
action - The event type to create
Throws:
java.lang.IllegalArgumentException - if the action or browser id are not legal values
Method Detail

getID

public int getID()
Get the type of event that has occurred.

Returns:
The type of event as defined by the types
See Also:
INITIALIZED, SHUTDOWN

getSource

public Browser getSource()
Get the source of this event. A reference to the browser instance that generated this event.

Returns:
A reference to the browser that generated this event

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium