Package org.web3d.x3d.sai
Class BrowserEvent
java.lang.Object
java.util.EventObject
org.web3d.x3d.sai.BrowserEvent
- All Implemented Interfaces:
java.io.Serializable
public class BrowserEvent
extends java.util.EventObject
Class representing events that happen in the Browser object.
Package hint: This specification class is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
Package hint: This specification class is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
-
Field Summary
Fields Modifier and Type Field Description static intCONNECTION_ERRORAn error has occurred that has caused the connection between the X3D player and the external application to fail.static java.lang.StringERROR_UNKNOWN_BROWSER_EVENT_VALUEError message if incorrect Browser event value encountered.static intINITIALIZEDThe X3D player has completed initial loading of the world.static intLAST_IDENTIFIERThe number of reserved identifier numbers for event conditions.static intSHUTDOWNThe currently loaded world is about to be unloaded.static intURL_ERRORAn error occurred in loading a scene from a URL call. -
Constructor Summary
Constructors Constructor Description BrowserEvent(java.lang.Object browser, int action)Create a new browser event. -
Method Summary
-
Field Details
-
INITIALIZED
public static final int INITIALIZEDThe X3D player has completed initial loading of the world. Event is generated just after the scene has been loaded and just before the first event has been sent.- See Also:
- Constant Field Values
-
SHUTDOWN
public static final int SHUTDOWNThe currently loaded world is about to be unloaded. Called just before the scene is about to be unloaded. If another world is going 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_ERRORAn error occurred in loading a scene from a URL call. Origin can be either a createVrmlFromURL call or loadURL.- See Also:
- Constant Field Values
-
CONNECTION_ERROR
public static final int CONNECTION_ERRORAn error has occurred that has caused the connection between the X3D player and the external application to fail. Potential causes include X3D player failure or a lost network connection.- See Also:
- Constant Field Values
-
LAST_IDENTIFIER
public static final int LAST_IDENTIFIERThe number of reserved identifier numbers for event conditions. Any value below this is considered to be a general specification-defined event as found in the Java Scene Authoring Interface (SAI) specification. Any values above this value are browser-specific messages.- See Also:
- Constant Field Values
-
ERROR_UNKNOWN_BROWSER_EVENT_VALUE
public static final java.lang.String ERROR_UNKNOWN_BROWSER_EVENT_VALUEError message if incorrect Browser event value encountered.
-
-
Constructor Details
-
BrowserEvent
public BrowserEvent(java.lang.Object browser, int action)Create a new browser event.- Parameters:
browser- The source of the browser that generated this eventaction- The event type to create- Throws:
java.lang.IllegalArgumentException- if the action or browser id are not legal values
-
-
Method Details
-
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,URL_ERROR,CONNECTION_ERROR,LAST_IDENTIFIER
-
toString
public java.lang.String toString(int value)Utility method providing the name of this event value.- Parameters:
value- The BrowserEvent value of interest.- Returns:
- The name of this BrowserEvent value.
-