aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/classes/share/javax/media/j3d/Light.java30
-rw-r--r--src/classes/share/javax/media/j3d/LightRetained.java16
2 files changed, 23 insertions, 23 deletions
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<Group> 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<Group> 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<LightRetained> newlyAddedMirrorLights = new ArrayList<LightRetained>()
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<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();
- }
+}
/**
* Appends the specified scope to this node's list of scopes.