Interface LoadSensor

All Superinterfaces:
X3DChildNode, X3DNetworkSensorNode, X3DNode, X3DSensorNode
All Known Implementing Classes:
LoadSensorObject

public interface LoadSensor
extends X3DNetworkSensorNode
LoadSensor generates events as watchList child nodes are either loaded or fail to load.

X3D node tooltip: [X3DNetworkSensorNode] LoadSensor generates events as watchList child nodes are either loaded or fail to load. Changing watchlist child nodes restarts the LoadSensor.
  • Hint: use multiple LoadSensor nodes to track multiple loading nodes individually.
  • Hint: Background is not sensed due to multiple-image ambiguity.
  • Warning: watchList child nodes are not rendered, so normally USE copies of other nodes to sense load status.
  • Hint: use Inline 'load' field to prompt or defer loading.
  • Warning: new X3D node, not supported in VRML97.

Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
See Also:
SAI Java Specification: TODO, X3D Abstract Specification: LoadSensor, X3D Tooltips: LoadSensor, X3D Scene Authoring Hints
  • Method Summary

    Modifier and Type Method Description
    void addWatchList​(X3DNode[] newValue)
    Add array of child watchList nodes to array of existing nodes (if any).
    boolean getEnabled()
    Provide boolean value from inputOutput SFBool field named enabled.
    boolean getIsActive()
    Provide boolean value from outputOnly SFBool field named isActive.
    boolean getIsLoaded()
    Provide boolean value from outputOnly SFBool field named isLoaded.
    double getLoadTime()
    Provide double value in seconds from outputOnly SFTime field named loadTime.
    X3DMetadataObject getMetadata()
    Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    float getProgress()
    Provide float value from outputOnly SFFloat field named progress.
    double getTimeOut()
    Provide double value in seconds within allowed range of [0,infinity) from inputOutput SFTime field named timeOut.
    X3DNode[] getWatchList()
    Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) from inputOutput MFNode field watchList.
    LoadSensor setEnabled​(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named enabled.
    LoadSensor setMetadata​(X3DMetadataObject newValue)
    Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    LoadSensor setTimeOut​(double newValue)
    Accessor method to assign double value in seconds to inputOutput SFTime field named timeOut.
    void setWatchList​(X3DNode newValue)
    Set single child watchList node, replacing prior array of existing nodes (if any).
    LoadSensor setWatchList​(X3DNode[] newValue)
    Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field watchList.
  • Method Details

    • getEnabled

      boolean getEnabled()
      Provide boolean value from inputOutput SFBool field named enabled.

      Tooltip: Enables/disables node operation. *
      Specified by:
      getEnabled in interface X3DNetworkSensorNode
      Specified by:
      getEnabled in interface X3DSensorNode
      Returns:
      value of enabled field
    • setEnabled

      LoadSensor setEnabled​(boolean newValue)
      Accessor method to assign boolean value to inputOutput SFBool field named enabled.

      Tooltip: Enables/disables node operation. *
      Specified by:
      setEnabled in interface X3DNetworkSensorNode
      Specified by:
      setEnabled in interface X3DSensorNode
      Parameters:
      newValue - is new value for the enabled field.
      Returns:
      LoadSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getIsActive

      boolean getIsActive()
      Provide boolean value from outputOnly SFBool field named isActive.

      Tooltip: isActive true/false events are sent when sensing starts/stops.
      • Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
      Specified by:
      getIsActive in interface X3DNetworkSensorNode
      Specified by:
      getIsActive in interface X3DSensorNode
      Returns:
      value of isActive field
    • getIsLoaded

      boolean getIsLoaded()
      Provide boolean value from outputOnly SFBool field named isLoaded.

      Tooltip: Notify when all watchList child nodes are loaded, or at least one has failed. Sends true on successfully loading all watchList child nodes. Sends false on timeOut of any watchList child nodes, failure of any watchList child nodes to load, or no local copies available and no network present.
      • Hint: use multiple LoadSensor nodes to track multiple loading nodes individually.
      • Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
      Returns:
      value of isLoaded field
    • getLoadTime

      double getLoadTime()
      Provide double value in seconds from outputOnly SFTime field named loadTime.

      Tooltip: Time of successful load complete, not sent on failure.
      • Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
      Returns:
      value of loadTime field
    • getMetadata

      X3DMetadataObject getMetadata()
      Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
      Specified by:
      getMetadata in interface X3DChildNode
      Specified by:
      getMetadata in interface X3DNetworkSensorNode
      Specified by:
      getMetadata in interface X3DNode
      Specified by:
      getMetadata in interface X3DSensorNode
      Returns:
      value of metadata field
      See Also:
      X3D Scene Authoring Hints: Metadata Nodes
    • setMetadata

      LoadSensor setMetadata​(X3DMetadataObject newValue)
      Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
      Specified by:
      setMetadata in interface X3DChildNode
      Specified by:
      setMetadata in interface X3DNetworkSensorNode
      Specified by:
      setMetadata in interface X3DNode
      Specified by:
      setMetadata in interface X3DSensorNode
      Parameters:
      newValue - is new value for the metadata field.
      Returns:
      LoadSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      See Also:
      X3D Scene Authoring Hints: Metadata Nodes
    • getProgress

      float getProgress()
      Provide float value from outputOnly SFFloat field named progress.

      Tooltip: [0,1] Sends 0.0 on start and 1.0 on completion. Intermediate values are browser dependent and always increasing (may indicate fraction of bytes, fraction of expected time or another metric).
      • Hint: only 0 and 1 events are guaranteed.
      • Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
      Returns:
      value of progress field
    • getTimeOut

      double getTimeOut()
      Provide double value in seconds within allowed range of [0,infinity) from inputOutput SFTime field named timeOut.

      Tooltip: Time in seconds of maximum load duration prior to declaring failure. Default value zero means use browser defaults. *
      Returns:
      value of timeOut field
    • setTimeOut

      LoadSensor setTimeOut​(double newValue)
      Accessor method to assign double value in seconds to inputOutput SFTime field named timeOut.

      Tooltip: Time in seconds of maximum load duration prior to declaring failure. Default value zero means use browser defaults. *
      Parameters:
      newValue - is new value for the timeOut field.
      Returns:
      LoadSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getWatchList

      X3DNode[] getWatchList()
      Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) from inputOutput MFNode field watchList.

      Tooltip: [X3DUrlObject] The watchList field monitors one or more USE nodes that contain a valid url field.
      • Hint: if watchList contains multiple USE nodes, output events are only generated when all children have loaded successfully or at least one node has failed.
      • Hint: if individual load status information is desired for different nodes, multiple LoadSensor nodes may be used, each with a single watchList element.
      • Hint: Anchor nodes can be monitored for binding a target Viewpoint, loading a new scene, or loading a new scene in a new window.


      Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DUrlObject.
      Returns:
      value of watchList field
      See Also:
      X3DUrlObject
    • setWatchList

      LoadSensor setWatchList​(X3DNode[] newValue)
      Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field watchList.

      Tooltip: [X3DUrlObject] The watchList field monitors one or more USE nodes that contain a valid url field.
      • Hint: if watchList contains multiple USE nodes, output events are only generated when all children have loaded successfully or at least one node has failed.
      • Hint: if individual load status information is desired for different nodes, multiple LoadSensor nodes may be used, each with a single watchList element.
      • Hint: Anchor nodes can be monitored for binding a target Viewpoint, loading a new scene, or loading a new scene in a new window.


      Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DUrlObject.
      Parameters:
      newValue - is new value for the watchList field.
      Returns:
      LoadSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • addWatchList

      void addWatchList​(X3DNode[] newValue)
      Add array of child watchList nodes to array of existing nodes (if any).

      Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DUrlObject.
      Parameters:
      newValue - is new value array to be appended the watchList field.
    • setWatchList

      void setWatchList​(X3DNode newValue)
      Set single child watchList node, replacing prior array of existing nodes (if any).
      Parameters:
      newValue - is new node for the watchList field