shout3d.core
Interface ResourceListener


public abstract interface ResourceListener

This provides an interface for registering the interest of one or more ResourceObservers.

The class implementing this interface must provide notice on the loading of any resource to each of these ResourceObservers.


Method Summary
 void addResourceObserver(ResourceObserver ro, java.lang.Object userData)
          This method registers the interest of a ResourceObserver
 java.net.URL getCurrentBaseURL()
          Gets the current base URL for loading resources.
 int getPendingCount()
          Returns the number of resources remaining to be loaded by the applet.
 void removeResourceObserver(ResourceObserver ro)
          This method unregisters the interest of a ResourceObserver
 

Method Detail

addResourceObserver

public void addResourceObserver(ResourceObserver ro,
                                java.lang.Object userData)
This method registers the interest of a ResourceObserver
Parameters:
observer - the ResourceObserver
userData - data that will be passed back to the observer's onLoadDone method.

removeResourceObserver

public void removeResourceObserver(ResourceObserver ro)
This method unregisters the interest of a ResourceObserver
Parameters:
observer - the ResourceObserver to unregister

getPendingCount

public int getPendingCount()
Returns the number of resources remaining to be loaded by the applet. This amount includes all model, sound, and texture files being loaded in all threads. It includes all pending and partially loaded resources. When the return value is 0, all resource loading requests are complete
Returns:
the number of resources remaining to be loaded

getCurrentBaseURL

public java.net.URL getCurrentBaseURL()
Gets the current base URL for loading resources. The returned URL is the directory in which the most recently loaded model file is located. The value returned will change whenever a new model file is loaded via the loadURL or setSceneFromURL methods on the associated Shout3DViewer.
Returns:
the current base URL for loading resources.