Class BrowserEvent

java.lang.Object
java.util.EventObject
org.web3d.x3d.sai.BrowserEvent
All Implemented Interfaces:
Serializable

public class BrowserEvent extends EventObject
Class representing events that happen in the Browser object.

Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the org.web3d.x3d.jsail classes.
Package hint: This specification class is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    An error has occurred that has caused the connection between the X3D player and the external application to fail.
    static final String
    Error message if incorrect Browser event value encountered.
    static final int
    The X3D player has completed initial loading of the world.
    static final int
    The number of reserved identifier numbers for event conditions.
    static final int
    The currently loaded world is about to be unloaded.
    static final int
    An error occurred in loading a scene from a URL call.

    Fields inherited from class java.util.EventObject

    source
  • Constructor Summary

    Constructors
    Constructor
    Description
    BrowserEvent(Object browser, int action)
    Create a new browser event.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the type of event that has occurred.
    toString(int value)
    Utility method providing the name of this event value.

    Methods inherited from class java.util.EventObject

    getSource, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • INITIALIZED

      public static final int INITIALIZED
      The 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:
    • 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 going to replace this, then an initialize event will be generated following this one.
      See Also:
    • URL_ERROR

      public static final int URL_ERROR
      An error occurred in loading a scene from a URL call. Origin can be either a createVrmlFromURL call or loadURL.
      See Also:
    • CONNECTION_ERROR

      public static final int CONNECTION_ERROR
      An 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:
    • 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 specification-defined event as found in the Java Scene Authoring Interface (SAI) specification. Any values above this value are browser-specific messages.
      See Also:
    • ERROR_UNKNOWN_BROWSER_EVENT_VALUE

      public static final String ERROR_UNKNOWN_BROWSER_EVENT_VALUE
      Error message if incorrect Browser event value encountered.
      See Also:
  • Constructor Details

    • BrowserEvent

      public BrowserEvent(Object browser, int action)
      Create a new browser event.
      Parameters:
      browser - The source of the browser that generated this event
      action - The event type to create
      Throws:
      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:
    • toString

      public 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.