|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface VRMLExternalNodeType
Representation of a node that defines it's content at a URL separate to this file that will also need loading.
The idea behind this node interface is that we are going to allow a separate thread from the one that created the initial node to simultaneously load the contents of this node. As we really don't know all the possible types to load, particularly with profiles, a common base class will make life much easier for us to deal with in a generic fashion.
The operation of this interface is to get the loader thread to set the load state as it is going. Once it has loaded the content it then tells the implementation about what it has found.
When fetching the URL list, it is expected that all URLs will be fully qualified. It will be up to the implementor to process the set URLs to contain only fully qualified URLs. For this, we will ensure that the world URL is set on every instance through the setWorldUrl() method.
| Field Summary | |
|---|---|
static int |
LOAD_COMPLETE
The node loaded sucessfully and has it's content available |
static int |
LOAD_FAILED
The node completed loading but none of the available content was successfully loaded. |
static int |
LOADING
The node is in the middle of the loading process. |
static int |
NOT_LOADED
The node has not started loading yet. |
| Method Summary | |
|---|---|
void |
addContentStateListener(VRMLContentStateListener l)
Add a listener to this node instance for the content state changes. |
void |
addUrlListener(VRMLUrlListener l)
Add a listener to this node instance for URL changes. |
java.lang.String |
getWorldUrl()
Get the world URL so set for this node. |
void |
removeContentStateListener(VRMLContentStateListener l)
Remove a listener from this node instance for the content state changes. |
void |
removeUrlListener(VRMLUrlListener l)
Remove a listener from this node instance for URL changes. |
void |
setWorldUrl(java.lang.String url)
Set the world URL so that any relative URLs may be corrected to the fully qualified version. |
| Field Detail |
|---|
static final int NOT_LOADED
static final int LOADING
static final int LOAD_COMPLETE
static final int LOAD_FAILED
| Method Detail |
|---|
void setWorldUrl(java.lang.String url)
url - The world URL.java.lang.String getWorldUrl()
void addUrlListener(VRMLUrlListener l)
l - The listener instance to addvoid removeUrlListener(VRMLUrlListener l)
l - The listener to be removedvoid addContentStateListener(VRMLContentStateListener l)
l - The listener instance to addvoid removeContentStateListener(VRMLContentStateListener l)
l - The listener to be removed
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||