diff options
author | Harvey Harrison <[email protected]> | 2013-01-24 23:16:34 -0800 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2013-01-24 23:16:34 -0800 |
commit | ff1da555675c7c61964d43931fb9b3f380d939cd (patch) | |
tree | 5a765880489d064cbf76aba9b92ff95ac3304b33 /src/classes | |
parent | cafc27fda4ffea1c830a6e39944c42844f4c0091 (diff) |
j3dcore: annotate scopes list for AlternateAppearance
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/classes')
-rw-r--r-- | src/classes/share/javax/media/j3d/AlternateAppearance.java | 31 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/AlternateAppearanceRetained.java | 16 |
2 files changed, 23 insertions, 24 deletions
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<Group> 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<Group> 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<GroupRetained> scopes = new Vector<GroupRetained>(); 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<Group> getAllScopes() { Enumeration<GroupRetained> elm = scopes.elements(); - Vector v = new Vector(scopes.size()); + Vector<Group> v = new Vector<Group>(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. |