aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-10-03 02:42:07 +0200
committerSven Gothel <[email protected]>2023-10-03 02:42:07 +0200
commit4fd725b1cd4bf4d9f1bd3a20e3b23784485c3751 (patch)
tree803e0d7df58b7401784db8e2d1648e07d0823642 /src/graphui
parentc8ec6fa7cc16a0777db16af8b4d0d0b898f8b546 (diff)
GraphUI Shape: Complete commit c8ec6fa7cc16a0777db16af8b4d0d0b898f8b546
Diffstat (limited to 'src/graphui')
-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;
}
}