From 5a24e0bbaaa0cdb61292e264b4919295fff40a2a Mon Sep 17 00:00:00 2001
From: Sven Göthel <sgothel@jausoft.com>
Date: Sat, 20 Jan 2024 05:07:10 +0100
Subject: GraphUI Group: Add ctor with most usable values, allowing injecting a
 Group as a one-liner in code

---
 src/graphui/classes/com/jogamp/graph/ui/Group.java | 25 +++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/src/graphui/classes/com/jogamp/graph/ui/Group.java b/src/graphui/classes/com/jogamp/graph/ui/Group.java
index 0cba294cc..29352fff0 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/Group.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/Group.java
@@ -96,7 +96,7 @@ public class Group extends Shape implements Container {
      * </p>
      */
     public Group() {
-        this(null);
+        this(null, null, null, null);
     }
 
     /**
@@ -107,9 +107,32 @@ public class Group extends Shape implements Container {
      * @param l optional {@link Layout}, maybe {@code null}
      */
     public Group(final Layout l) {
+        this(null, l, null, null);
+    }
+
+    /**
+     * Create a group of {@link Shape}s w/ given {@link Group.Layout} and {@link Shape}.
+     * <p>
+     * Default is non-interactive, see {@link #setInteractive(boolean)}.
+     * </p>
+     * @param name optional name for {@link #setName(String)}
+     * @param l optional {@link Layout}, maybe {@code null}
+     * @param fixedSize optional fixed size for {@link #setFixedSize(Vec2f)}
+     * @param s optional {@link Shape} for {@link #addShape(Shape)}
+     */
+    public Group(final String name, final Layout l, final Vec2f fixedSize, final Shape s) {
         super();
+        if( null != name ) {
+            this.setName(name);
+        }
         this.layouter = l;
         this.setInteractive(false);
+        if( null != fixedSize ) {
+            this.setFixedSize(fixedSize);
+        }
+        if( null != s ) {
+            addShape(s);
+        }
     }
 
     @Override
-- 
cgit v1.2.3