From a2a19c03aa361610a6832bfc6d7cace24f2b8f42 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 1 Dec 2024 16:39:52 +0100 Subject: [PATCH] Fix Javadoc issues --- .../engine/base/utility/misc/ArrayUtil.java | 10 ++++++++++ .../engine/base/utility/misc/StringUtil.java | 8 ++++++++ .../engine/base/utility/misc/TypeConversion.java | 8 ++++++++ .../engine/rendering/renderer/Renderer.java | 8 ++++++++ .../staropensource/engine/rendering/type/Window.java | 10 ++++++++-- 5 files changed, 42 insertions(+), 2 deletions(-) diff --git a/base/src/main/java/de/staropensource/engine/base/utility/misc/ArrayUtil.java b/base/src/main/java/de/staropensource/engine/base/utility/misc/ArrayUtil.java index aa52f27..c732fc7 100644 --- a/base/src/main/java/de/staropensource/engine/base/utility/misc/ArrayUtil.java +++ b/base/src/main/java/de/staropensource/engine/base/utility/misc/ArrayUtil.java @@ -31,6 +31,14 @@ import java.util.Collections; * @since v1-alpha9 */ public final class ArrayUtil { + /** + * Creates and initializes an + * instance of this class. + * + * @since v1-alpha9 + */ + private ArrayUtil() {} + /** * Removes the first {@code n} elements * from the specified array. @@ -40,6 +48,7 @@ public final class ArrayUtil { * specified array, an empty array * will be returned. * + * @param type * @param array array to operate on * @param n amount to remove * @return array with the first elements removed @@ -62,6 +71,7 @@ public final class ArrayUtil { * specified array, an empty array * will be returned. * + * @param type * @param array array to operate on * @param n amount to remove * @return array with the last elements removed diff --git a/base/src/main/java/de/staropensource/engine/base/utility/misc/StringUtil.java b/base/src/main/java/de/staropensource/engine/base/utility/misc/StringUtil.java index cd2a380..292eecc 100644 --- a/base/src/main/java/de/staropensource/engine/base/utility/misc/StringUtil.java +++ b/base/src/main/java/de/staropensource/engine/base/utility/misc/StringUtil.java @@ -28,6 +28,14 @@ import org.jetbrains.annotations.Nullable; * @since v1-alpha9 */ public final class StringUtil { + /** + * Creates and initializes an + * instance of this class. + * + * @since v1-alpha9 + */ + private StringUtil() {} + /** * Counts the number of occurrences of the specified substring inside the specified string. * diff --git a/base/src/main/java/de/staropensource/engine/base/utility/misc/TypeConversion.java b/base/src/main/java/de/staropensource/engine/base/utility/misc/TypeConversion.java index eed2050..d227f77 100644 --- a/base/src/main/java/de/staropensource/engine/base/utility/misc/TypeConversion.java +++ b/base/src/main/java/de/staropensource/engine/base/utility/misc/TypeConversion.java @@ -28,6 +28,14 @@ import org.jetbrains.annotations.Range; * @since v1-alpha9 */ public final class TypeConversion { + /** + * Creates and initializes an + * instance of this class. + * + * @since v1-alpha9 + */ + private TypeConversion() {} + /** * Converts a boolean into an integer. * diff --git a/rendering/src/main/java/de/staropensource/engine/rendering/renderer/Renderer.java b/rendering/src/main/java/de/staropensource/engine/rendering/renderer/Renderer.java index a640d19..10e869b 100644 --- a/rendering/src/main/java/de/staropensource/engine/rendering/renderer/Renderer.java +++ b/rendering/src/main/java/de/staropensource/engine/rendering/renderer/Renderer.java @@ -214,6 +214,14 @@ public final class Renderer { // ----> Initialization + /** + * Creates and initializes an + * instance of this class. + * + * @since v1-alpha9 + */ + private Renderer() {} + /** * Initializes the renderer. * diff --git a/rendering/src/main/java/de/staropensource/engine/rendering/type/Window.java b/rendering/src/main/java/de/staropensource/engine/rendering/type/Window.java index ed6b7f7..22cb45d 100644 --- a/rendering/src/main/java/de/staropensource/engine/rendering/type/Window.java +++ b/rendering/src/main/java/de/staropensource/engine/rendering/type/Window.java @@ -389,6 +389,7 @@ public final class Window implements Closeable { * * @since v1-alpha9 */ + @Getter(value = AccessLevel.NONE) private GLFWKeyCallback keyCallback; /** @@ -397,6 +398,7 @@ public final class Window implements Closeable { * * @since v1-alpha9 */ + @Getter(value = AccessLevel.NONE) private GLFWMouseButtonCallback mouseButtonCallback; @@ -503,7 +505,7 @@ public final class Window implements Closeable { glfwWindowHintString(GLFW_X11_INSTANCE_NAME, name); // Create window - internalWindowIdentifier = glfwCreateWindow(1, 1, "", NULL, NULL); + internalWindowIdentifier = glfwCreateWindow(size.getX(), size.getY(), "", NULL, NULL); if (internalWindowIdentifier == NULL) throw new WindowCreationFailureException(); @@ -655,7 +657,9 @@ public final class Window implements Closeable { if (queuedPropertyUpdates.containsKey("size")) { width.put(((Vec2i) queuedPropertyUpdates.get("size")).getX()); height.put(((Vec2i) queuedPropertyUpdates.get("size")).getY()); - glfwSetWindowSize(internalWindowIdentifier, width.get(), height.get()); + // TODO + if (!fresh) + glfwSetWindowSize(internalWindowIdentifier, width.get(), height.get()); } else { glfwGetWindowSize(internalWindowIdentifier, width, height); size = new Vec2i(width.get(), height.get()); @@ -924,6 +928,7 @@ public final class Window implements Closeable { * @param size new size * @since v1-alpha9 */ + @ApiStatus.Experimental public void setSize(@NotNull Vec2i size) { // Ensure the window is not terminated if (terminated) @@ -977,6 +982,7 @@ public final class Window implements Closeable { * @param position new position * @since v1-alpha9 */ + @ApiStatus.Experimental public void setPosition(@NotNull Vec2i position) { // Ensure the window is not terminated if (isTerminated())