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).
See Also:
SAI Java Specification: B.5.1 BrowserEvent, SAI Abstract Specification: 5.4.1.2 SAI_Browser_Event, X3D Tooltips: BrowserEvent, X3D Scene Authoring Hints, Serialized Form
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static int CONNECTION_ERROR
    An error has occurred that has caused the connection between the X3D player and the external application to fail.
    static java.lang.String ERROR_UNKNOWN_BROWSER_EVENT_VALUE
    Error message if incorrect Browser event value encountered.
    static int INITIALIZED
    The X3D player has completed 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 a scene from a URL call.

    Fields inherited from class java.util.EventObject

    source
  • Constructor Summary

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

    Modifier and Type Method Description
    int getID()
    Get the type of event that has occurred.
    java.lang.String 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:
      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 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_ERROR
      An 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_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:
      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 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_VALUE
      Error message if incorrect Browser event value encountered.
      See Also:
      X3D Java SAI: B.5.1 BrowserEvent, X3D SAI: 4.4.6 Browser, X3D SAI: 4.5 Events, Constant Field Values
  • 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 event
      action - 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.