aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/Scene.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/Scene.java b/src/graphui/classes/com/jogamp/graph/ui/Scene.java
index cf3e16701..28855d99c 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/Scene.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/Scene.java
@@ -307,15 +307,26 @@ public final class Scene implements Container, GLEventListener {
public boolean contains(final Shape s) {
return false;
}
+ @Override
public Shape getShapeByIdx(final int id) {
if( 0 > id ) {
return null;
}
return shapes.get(id);
}
- public Shape getShapeByName(final int name) {
+ @Override
+ public Shape getShapeByID(final int id) {
+ for(final Shape b : shapes) {
+ if(b.getID() == id ) {
+ return b;
+ }
+ }
+ return null;
+ }
+ @Override
+ public Shape getShapeByName(final String name) {
for(final Shape b : shapes) {
- if(b.getName() == name ) {
+ if( b.getName().equals(name) ) {
return b;
}
}