diff options
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/Group.java | 4 | ||||
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/Scene.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/Group.java b/src/graphui/classes/com/jogamp/graph/ui/Group.java index 80783d94c..6e181a0a1 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/Group.java +++ b/src/graphui/classes/com/jogamp/graph/ui/Group.java @@ -27,11 +27,11 @@ */ package com.jogamp.graph.ui; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Comparator; import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; import com.jogamp.graph.curve.Region; import com.jogamp.graph.curve.opengl.RegionRenderer; @@ -71,7 +71,7 @@ public class Group extends Shape implements Container { void layout(final Group g, final AABBox box, final PMVMatrix pmv); } - private final List<Shape> shapes = new ArrayList<Shape>(); + private final List<Shape> shapes = new CopyOnWriteArrayList<Shape>(); private Layout layouter; private Rectangle border = null; diff --git a/src/graphui/classes/com/jogamp/graph/ui/Scene.java b/src/graphui/classes/com/jogamp/graph/ui/Scene.java index 5100aabf7..6abbc7f08 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/Scene.java +++ b/src/graphui/classes/com/jogamp/graph/ui/Scene.java @@ -29,12 +29,12 @@ package com.jogamp.graph.ui; import java.io.File; import java.nio.ByteBuffer; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Comparator; import java.util.List; import java.util.Locale; +import java.util.concurrent.CopyOnWriteArrayList; import com.jogamp.opengl.FPSCounter; import com.jogamp.opengl.GL; @@ -109,7 +109,7 @@ public final class Scene implements Container, GLEventListener { @SuppressWarnings("unused") private static final boolean DEBUG = false; - private final List<Shape> shapes = new ArrayList<Shape>(); + private final List<Shape> shapes = new CopyOnWriteArrayList<Shape>(); private float dbgBorderThickness = 0f; private boolean doFrustumCulling = false; |