| java.lang.Object org.jdesktop.j3dfly.namecontrol.NameControl
NameControl | public class NameControl extends java.lang.Object (Code) | | Provide storage and access for any named objects in the SceneGraph
The object and scene names are case sensitive
Object are also stored in by class lists, so you can retrieve all
instances of Behavior for example
author: Paul Byrne version: $Id: NameControl.java,v 1.2 2007/02/07 01:27:38 paulby Exp $ |
Inner Class :public class ObjectName | |
Method Summary | |
public void | addNameUpdateListener(NameUpdateListener listener) | public void | addObject(String sceneName, String objectName, Object obj) | public void | addObjectsFromFile(String sceneName, Hashtable table) Add all the named objects in the hash table. | public void | enableSearchOnObject(boolean enable) | public Iterator | getBehaviorNames() Returns an iterator over a list of all the names of Behavior object. | public Iterator | getEnvironmentNames() Returns an iterator over a list of all the names of Light and
Fog object. | public Object | getNamedObject(String sceneName, String objectName) | public Object | getNamedObject(ObjectName name) | public ObjectName | getObjectName(Object obj) | public String[] | getObjectNames(String sceneName) | public Iterator | getOtherNames() | public String[] | getSceneNames() | public int | getUniqueID() | public boolean | isUnique(String sceneName, String nodeName) | public void | removeNameUpdateListener(NameUpdateListener listener) | public void | removeObject(String sceneName, String name, Object obj) | public void | renameObject(String sceneName, String oldName, String newName, Object obj) Renames the object, oldName and newName must not be null and
sceneName:oldName must exist in the name database. |
NameControl | public NameControl()(Code) | | Creates new NameControl
|
addNameUpdateListener | public void addNameUpdateListener(NameUpdateListener listener)(Code) | | Add a listener for NameUpdateEvents
|
addObject | public void addObject(String sceneName, String objectName, Object obj)(Code) | | Add the named object to the specified scene's names
Generates a NameUpdateEvent( OBJECT_ADDED )
|
addObjectsFromFile | public void addObjectsFromFile(String sceneName, Hashtable table)(Code) | | Add all the named objects in the hash table. The object references
are copied so table can be discarded once this method returns.
The names will be associated with the filename so different files
can have the same object names and no conflicts will result
|
enableSearchOnObject | public void enableSearchOnObject(boolean enable)(Code) | | Enable Searching of object name from Object
|
getBehaviorNames | public Iterator getBehaviorNames()(Code) | | Returns an iterator over a list of all the names of Behavior object.
Each object in the list is of type ObjectName
|
getEnvironmentNames | public Iterator getEnvironmentNames()(Code) | | Returns an iterator over a list of all the names of Light and
Fog object.
Each object in the list is of type ObjectName
|
getNamedObject | public Object getNamedObject(ObjectName name)(Code) | | Returns the named object
|
getObjectName | public ObjectName getObjectName(Object obj)(Code) | | Get the name of this object
|
getObjectNames | public String[] getObjectNames(String sceneName)(Code) | | Return a list of the object names within the scene
|
getOtherNames | public Iterator getOtherNames()(Code) | | Returns an iterator over a alist of all the names not in the Behavior list
Each object in the list is of type ObjectName
|
getSceneNames | public String[] getSceneNames()(Code) | | Return a list of the scene names
|
getUniqueID | public int getUniqueID()(Code) | | Return a uniqueID that can be appended to a name to
make it unique
|
isUnique | public boolean isUnique(String sceneName, String nodeName)(Code) | | Returns true if the name pair does not already exist in the
name database
|
removeObject | public void removeObject(String sceneName, String name, Object obj)(Code) | | Removes the objects name
Generates a NameUpdateEvent( NAME_REMOVED )
|
renameObject | public void renameObject(String sceneName, String oldName, String newName, Object obj)(Code) | | Renames the object, oldName and newName must not be null and
sceneName:oldName must exist in the name database.
Generates a NameUpdateEvent( NAME_CHANGED )
|
|
|