From 4fd725b1cd4bf4d9f1bd3a20e3b23784485c3751 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 3 Oct 2023 02:42:07 +0200 Subject: GraphUI Shape: Complete commit c8ec6fa7cc16a0777db16af8b4d0d0b898f8b546 --- src/graphui/classes/com/jogamp/graph/ui/Scene.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/graphui/classes/com/jogamp') 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; } } -- cgit v1.2.3