aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-03-20 11:53:22 +0100
committerSven Gothel <[email protected]>2023-03-20 11:53:22 +0100
commitd73542248c51dfcfa6a23366a6797076cde48191 (patch)
tree0956ab85af7937a9dde1d1c050bd33b92f5383b6 /src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java
parent613253b9416b231eece0adbdebc50342cf578597 (diff)
GraphUI Scene: Add [add|remove]Shapes(Collection) .. for convenience
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java')
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java b/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java
index d94ff286a..5c5fc25b9 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java
@@ -30,6 +30,7 @@ package com.jogamp.graph.ui.gl;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.Comparator;
import com.jogamp.opengl.FPSCounter;
@@ -198,6 +199,12 @@ public final class Scene implements GLEventListener {
public void removeShape(final Shape b) {
shapes.remove(b);
}
+ public void addShapes(final Collection<? extends Shape> shapes) {
+ this.shapes.addAll(shapes);
+ }
+ public void removeShapes(final Collection<? extends Shape> shapes) {
+ this.shapes.removeAll(shapes);
+ }
public Shape getShapeByIdx(final int id) {
if( 0 > id ) {
return null;