From d73542248c51dfcfa6a23366a6797076cde48191 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 20 Mar 2023 11:53:22 +0100 Subject: GraphUI Scene: Add [add|remove]Shapes(Collection) .. for convenience --- src/graphui/classes/com/jogamp/graph/ui/gl/Scene.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/graphui/classes/com/jogamp/graph') 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 shapes) { + this.shapes.addAll(shapes); + } + public void removeShapes(final Collection shapes) { + this.shapes.removeAll(shapes); + } public Shape getShapeByIdx(final int id) { if( 0 > id ) { return null; -- cgit v1.2.3