From 2e52e801cfb14a96c60bf3e003af221efeddf3c3 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 24 Sep 2023 02:36:17 +0200 Subject: GraphUI Button: Remove redundant ctors and methods. ZOffset shall be simply given, calculated by caller --- .../classes/com/jogamp/graph/ui/shapes/Button.java | 68 ---------------------- 1 file changed, 68 deletions(-) (limited to 'src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java') diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java index 16d9a6213..2e8c53b8d 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java +++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java @@ -103,48 +103,6 @@ public class Button extends BaseButton { this(renderModes, labelFont, labelText, width, height, DEFAULT_LABEL_ZOFFSET); } - /** - * Create a text labeled button Graph based {@link GLRegion} UI {@link Shape}. - *

- * Sets the {@link #setLabelZOffset(float) Z-axis offset} to the smallest resolvable Z separation at the given range, - * used to separate the {@link BaseButton} from the {@link Label}. - *

- * @param renderModes Graph's {@link Region} render modes, see {@link GLRegion#create(GLProfile, int, TextureSequence) create(..)}. - * @param labelFont {@link Font} for the label - * @param labelText the label text - * @param width width of the button - * @param height height of the button - * @param zBits depth buffer bit-depth, minimum 16-bit - * @param setup {@link PMVMatrixSetup} for scene-distance as z-position and zNear - * @see FloatUtil#getZBufferEpsilon(int, float, float) - * @see Scene#getZEpsilon(int, com.jogamp.graph.ui.Scene.PMVMatrixSetup) - */ - public Button(final int renderModes, final Font labelFont, final CharSequence labelText, - final float width, final float height, final int zBits, final Scene.PMVMatrixSetup setup) { - this(renderModes, labelFont, labelText, width, height, Scene.getZEpsilon(zBits, setup)); - } - - /** - * Create a text labeled button Graph based {@link GLRegion} UI {@link Shape}. - *

- * Sets the {@link #setLabelZOffset(float) Z-axis offset} to the smallest resolvable Z separation at the given range, - * used to separate the {@link BaseButton} from the {@link Label}. - *

- * @param renderModes Graph's {@link Region} render modes, see {@link GLRegion#create(GLProfile, int, TextureSequence) create(..)}. - * @param labelFont {@link Font} for the label - * @param labelText the label text - * @param width width of the button - * @param height height of the button - * @param zBits depth buffer bit-depth, minimum 16-bit - * @param scene {@link Scene} to use {@link Scene#getZEpsilon(int)} - * @see FloatUtil#getZBufferEpsilon(int, float, float) - * @see Scene#getZEpsilon(int) - */ - public Button(final int renderModes, final Font labelFont, final CharSequence labelText, - final float width, final float height, final int zBits, final Scene scene) { - this(renderModes, labelFont, labelText, width, height, scene.getZEpsilon(zBits)); - } - /** * Create a text labeled button Graph based {@link GLRegion} UI {@link Shape}. * @param renderModes Graph's {@link Region} render modes, see {@link GLRegion#create(GLProfile, int, TextureSequence) create(..)}. @@ -257,32 +215,6 @@ public class Button extends BaseButton { return setLabelZOffset( FloatUtil.getZBufferEpsilon(zBits, zDist, zNear) ); } - /** - * Set the Z-axis offset to the smallest resolvable Z separation at the given range, - * used to separate the {@link BaseButton} from the {@link Label}. - * @param zBits depth buffer bit-depth, minimum 16-bit - * @param setup {@link PMVMatrixSetup} for scene-distance as z-position and zNear - * @return this instance for chaining - * @see FloatUtil#getZBufferEpsilon(int, float, float) - * @see Scene#getZEpsilon(int, com.jogamp.graph.ui.Scene.PMVMatrixSetup) - */ - public Button setLabelZOffset(final int zBits, final Scene.PMVMatrixSetup setup) { - return setLabelZOffset( Scene.getZEpsilon(zBits, setup) ); - } - - /** - * Set the Z-axis offset to the smallest resolvable Z separation at the given range, - * used to separate the {@link BaseButton} from the {@link Label}. - * @param zBits depth buffer bit-depth, minimum 16-bit - * @param scene {@link Scene} to use {@link Scene#getZEpsilon(int)} - * @return this instance for chaining - * @see FloatUtil#getZBufferEpsilon(int, float, float) - * @see Scene#getZEpsilon(int) - */ - public Button setLabelZOffset(final int zBits, final Scene scene) { - return setLabelZOffset( scene.getZEpsilon(zBits) ); - } - public final float getSpacingX() { return spacingX; } public final float getSpacingY() { return spacingY; } -- cgit v1.2.3