diff options
author | Sven Gothel <[email protected]> | 2023-09-20 19:52:34 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-09-20 19:52:34 +0200 |
commit | 5eabbd8d3fc2b1e670b7641575efefe3fe235980 (patch) | |
tree | ec55e3b30b7c56030fcfdccf35126dfae3710e01 /src/graphui | |
parent | 5d6e8a367c03644740187e500c6de5d3ac039d5e (diff) |
GraphUI Container: Add getShapeCount() and add API doc ..
Diffstat (limited to 'src/graphui')
-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) ) { |