From 118d754af34d6d475600e6747e01e950a6cf77cf Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 20 Mar 2023 20:48:44 +0100 Subject: GraphUI Shape: Provide empty default implementation for clearImpl() and destroyImpl() --- src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java | 6 ++++-- src/graphui/classes/com/jogamp/graph/ui/gl/shapes/CrossHair.java | 8 -------- src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Label.java | 8 -------- src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Rectangle.java | 8 -------- .../classes/com/jogamp/graph/ui/gl/shapes/RoundButton.java | 8 -------- 5 files changed, 4 insertions(+), 34 deletions(-) (limited to 'src/graphui/classes/com/jogamp/graph') diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java b/src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java index 9f39564ea..7928d09f4 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/Shape.java @@ -1137,8 +1137,10 @@ public abstract class Shape { // // - protected abstract void clearImpl(GL2ES2 gl, RegionRenderer renderer); - protected abstract void destroyImpl(GL2ES2 gl, RegionRenderer renderer); + protected void clearImpl(final GL2ES2 gl, final RegionRenderer renderer) { } + + protected void destroyImpl(final GL2ES2 gl, final RegionRenderer renderer) { } + protected abstract void addShapeToRegion(); // diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/CrossHair.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/CrossHair.java index 62c76d2b2..1d2df261e 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/CrossHair.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/CrossHair.java @@ -61,14 +61,6 @@ public class CrossHair extends Shape { markShapeDirty(); } - @Override - protected void clearImpl(final GL2ES2 gl, final RegionRenderer renderer) { - } - - @Override - protected void destroyImpl(final GL2ES2 gl, final RegionRenderer renderer) { - } - @Override protected void addShapeToRegion() { final OutlineShape shape = new OutlineShape(vertexFactory); diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Label.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Label.java index 534f9b292..5e1f88df9 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Label.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Label.java @@ -132,14 +132,6 @@ public class Label extends Shape { return GLRegion.create(glp, getRenderModes(), null, font, text); } - @Override - protected void clearImpl(final GL2ES2 gl, final RegionRenderer renderer) { - } - - @Override - protected void destroyImpl(final GL2ES2 gl, final RegionRenderer renderer) { - } - private final OutlineShape.Visitor shapeVisitor = new OutlineShape.Visitor() { @Override public void visit(final OutlineShape shape, final AffineTransform t) { diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Rectangle.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Rectangle.java index 2c9ec53a0..391390bea 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Rectangle.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Rectangle.java @@ -61,14 +61,6 @@ public class Rectangle extends Shape { markShapeDirty(); } - @Override - protected void clearImpl(final GL2ES2 gl, final RegionRenderer renderer) { - } - - @Override - protected void destroyImpl(final GL2ES2 gl, final RegionRenderer renderer) { - } - @Override protected void addShapeToRegion() { final OutlineShape shape = new OutlineShape(vertexFactory); diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/RoundButton.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/RoundButton.java index e8636f41e..aa8aabbdb 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/RoundButton.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/RoundButton.java @@ -58,14 +58,6 @@ public abstract class RoundButton extends Shape { this.height = height; } - @Override - protected void clearImpl(final GL2ES2 gl, final RegionRenderer renderer) { - } - - @Override - protected void destroyImpl(final GL2ES2 gl, final RegionRenderer renderer) { - } - public final float getWidth() { return width; } public final float getHeight() { return height; } -- cgit v1.2.3