From ff1da555675c7c61964d43931fb9b3f380d939cd Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Thu, 24 Jan 2013 23:16:34 -0800 Subject: j3dcore: annotate scopes list for AlternateAppearance Signed-off-by: Harvey Harrison --- .../share/javax/media/j3d/AlternateAppearance.java | 31 +++++++++++----------- .../media/j3d/AlternateAppearanceRetained.java | 16 +++++------ 2 files changed, 23 insertions(+), 24 deletions(-) (limited to 'src/classes/share/javax') diff --git a/src/classes/share/javax/media/j3d/AlternateAppearance.java b/src/classes/share/javax/media/j3d/AlternateAppearance.java index c3354f1..568d248 100644 --- a/src/classes/share/javax/media/j3d/AlternateAppearance.java +++ b/src/classes/share/javax/media/j3d/AlternateAppearance.java @@ -363,22 +363,21 @@ public class AlternateAppearance extends Leaf { } - /** - * Returns an enumeration of this AlternateAppearance node's list - * of scopes. - * @return an Enumeration object containing all nodes in this - * AlternateAppearance 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() { +/** + * Returns an enumeration of this AlternateAppearance node's list + * of scopes. + * @return an Enumeration object containing all nodes in this + * AlternateAppearance 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("AlternateAppearance11")); + if (!this.getCapability(ALLOW_SCOPE_READ)) + throw new CapabilityNotSetException(J3dI18N.getString("AlternateAppearance11")); - - return (Enumeration) ((AlternateAppearanceRetained)this.retained).getAllScopes(); - } + return ((AlternateAppearanceRetained)this.retained).getAllScopes(); +} /** @@ -537,10 +536,10 @@ public class AlternateAppearance extends Leaf { 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()); } // correct value will set in updateNodeReferences diff --git a/src/classes/share/javax/media/j3d/AlternateAppearanceRetained.java b/src/classes/share/javax/media/j3d/AlternateAppearanceRetained.java index 9f89940..7240b18 100644 --- a/src/classes/share/javax/media/j3d/AlternateAppearanceRetained.java +++ b/src/classes/share/javax/media/j3d/AlternateAppearanceRetained.java @@ -348,18 +348,18 @@ Vector scopes = new Vector(); initRemoveScope(i); } - /** - * Returns an enumeration object of the scoperen. - * @return an enumeration object of the scoperen - */ - Enumeration getAllScopes() { +/** + * Returns an enumeration object of the scoperen. + * @return an enumeration object of the scoperen + */ +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(); - } +} /** * Returns the index of the specified Group node in this node's list of scopes. -- cgit v1.2.3