diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/Container.java | 5 | ||||
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/Group.java | 8 | ||||
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/Scene.java | 8 |
3 files changed, 15 insertions, 6 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/Container.java b/src/graphui/classes/com/jogamp/graph/ui/Container.java index bc1e6d94f..8a5d34ea8 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/Container.java +++ b/src/graphui/classes/com/jogamp/graph/ui/Container.java @@ -43,8 +43,13 @@ import com.jogamp.graph.ui.Shape.Visitor1; */ public interface Container { + /** Returns number of {@link Shape}s, see {@link #getShapes()}. */ + int getShapeCount(); + + /** Returns added {@link Shape}s, see {@link #addShape(Shape)}. */ List<Shape> getShapes(); + /** Adds a {@link Shape}. */ void addShape(Shape s); /** diff --git a/src/graphui/classes/com/jogamp/graph/ui/Group.java b/src/graphui/classes/com/jogamp/graph/ui/Group.java index 8a50d19f3..3814eaa82 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/Group.java +++ b/src/graphui/classes/com/jogamp/graph/ui/Group.java @@ -108,9 +108,11 @@ public class Group extends Shape implements Container { public Group setLayout(final Layout l) { layouter = l; return this; } @Override - public List<Shape> getShapes() { - return shapes; - } + public int getShapeCount() { return shapes.size(); } + + @Override + public List<Shape> getShapes() { return shapes; } + @Override public void addShape(final Shape s) { shapes.add(s); diff --git a/src/graphui/classes/com/jogamp/graph/ui/Scene.java b/src/graphui/classes/com/jogamp/graph/ui/Scene.java index 53ee7537e..370c51dc7 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/Scene.java +++ b/src/graphui/classes/com/jogamp/graph/ui/Scene.java @@ -244,9 +244,11 @@ public final class Scene implements Container, GLEventListener { } @Override - public List<Shape> getShapes() { - return shapes; - } + public int getShapeCount() { return shapes.size(); } + + @Override + public List<Shape> getShapes() { return shapes; } + @Override public void addShape(final Shape s) { if( !s.hasBorder() && !FloatUtil.isZero(dbgBorderThickness) ) { |