From 74a75322a51176756f54aa2fc18fa914b4e9da1b Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Sat, 23 Feb 2013 17:08:44 -0800 Subject: j3dcore: annotate getScopes methods to return Enumeration Signed-off-by: Harvey Harrison --- src/classes/share/javax/media/j3d/Light.java | 30 +++++++++++----------- .../share/javax/media/j3d/LightRetained.java | 16 ++++++------ 2 files changed, 23 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/classes/share/javax/media/j3d/Light.java b/src/classes/share/javax/media/j3d/Light.java index 0af5da4..affaf9b 100644 --- a/src/classes/share/javax/media/j3d/Light.java +++ b/src/classes/share/javax/media/j3d/Light.java @@ -436,20 +436,20 @@ public abstract class Light extends Leaf { } - /** - * Returns an enumeration of this Light node's list of scopes. - * @return an Enumeration object containing all nodes in this Light node's - * list of scopes. - * @exception CapabilityNotSetException if appropriate capability is - * not set and this object is part of live or compiled scene graph - */ - public Enumeration getAllScopes() { - if (isLiveOrCompiled()) - if(!this.getCapability(ALLOW_SCOPE_READ)) - throw new CapabilityNotSetException(J3dI18N.getString("Light8")); +/** + * Returns an enumeration of this Light node's list of scopes. + * @return an Enumeration object containing all nodes in this Light node's + * list of scopes. + * @exception CapabilityNotSetException if appropriate capability is + * not set and this object is part of live or compiled scene graph + */ +public Enumeration getAllScopes() { +if (isLiveOrCompiled()) + if(!this.getCapability(ALLOW_SCOPE_READ)) + throw new CapabilityNotSetException(J3dI18N.getString("Light8")); - return (Enumeration) ((LightRetained)this.retained).getAllScopes(); - } +return ((LightRetained)this.retained).getAllScopes(); +} /** @@ -668,10 +668,10 @@ public abstract class Light extends Leaf { rt.initColor(c); rt.initInfluencingBounds(attr.getInfluencingBounds()); - Enumeration elm = attr.getAllScopes(); + Enumeration elm = attr.getAllScopes(); while (elm.hasMoreElements()) { // this reference will set correctly in updateNodeReferences() callback - rt.initAddScope((Group) elm.nextElement()); + rt.initAddScope(elm.nextElement()); } // this reference will set correctly in updateNodeReferences() callback diff --git a/src/classes/share/javax/media/j3d/LightRetained.java b/src/classes/share/javax/media/j3d/LightRetained.java index 0eda957..7ab15e5 100644 --- a/src/classes/share/javax/media/j3d/LightRetained.java +++ b/src/classes/share/javax/media/j3d/LightRetained.java @@ -342,18 +342,18 @@ ArrayList newlyAddedMirrorLights = new ArrayList() return (Group)scopes.elementAt(index).source; } - /** - * Returns an enumeration object of the scope - * @return an enumeration object of the scope - */ - Enumeration getAllScopes() { +/** + * Returns an enumeration object of the scope + * @return an enumeration object of the scope + */ +Enumeration getAllScopes() { Enumeration elm = scopes.elements(); - Vector v = new Vector(scopes.size()); + Vector v = new Vector(scopes.size()); while (elm.hasMoreElements()) { - v.add(elm.nextElement().source); + v.add((Group)elm.nextElement().source); } return v.elements(); - } +} /** * Appends the specified scope to this node's list of scopes. -- cgit v1.2.3