From 8b63ebafc4e0036659c8aaa89ad678bc34637af2 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Tue, 6 Sep 2022 02:25:14 +0300 Subject: Stabilise observable properties --- src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java | 7 ------- .../github/cottonmc/cotton/gui/widget/data/ObservableProperty.java | 3 --- .../io/github/cottonmc/cotton/gui/widget/data/ObservableView.java | 3 --- 3 files changed, 13 deletions(-) (limited to 'src') diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java index eb69e50..f1fc707 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java @@ -11,7 +11,6 @@ import io.github.cottonmc.cotton.gui.GuiDescription; import io.github.cottonmc.cotton.gui.impl.VisualLogger; import io.github.cottonmc.cotton.gui.widget.data.InputResult; import io.github.cottonmc.cotton.gui.widget.data.ObservableProperty; -import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.Nullable; import org.lwjgl.glfw.GLFW; @@ -492,14 +491,12 @@ public class WWidget { * {@link #paint(MatrixStack, int, int, int, int) paint()} directly. * That lets you react to different parts of the widget being hovered over. * - * @experimental * @return the {@code hovered} property * @since 4.2.0 * @see #canHover() * @see #isHovered() * @see #setHovered(boolean) */ - @ApiStatus.Experimental public ObservableProperty hoveredProperty() { return hovered; } @@ -508,11 +505,9 @@ public class WWidget { * Returns whether the user is hovering over this widget. * This is equivalent to calling {@link #hoveredProperty()}.get(). * - * @experimental * @return true if this widget is hovered, false otherwise * @since 4.2.0 */ - @ApiStatus.Experimental public final boolean isHovered() { return hoveredProperty().get(); } @@ -521,11 +516,9 @@ public class WWidget { * Sets the {@link #hoveredProperty() hovered} property. * This is equivalent to calling {@link #hoveredProperty()}.set(hovered). * - * @experimental * @param hovered the new value; true if hovered, false otherwise * @since 4.2.0 */ - @ApiStatus.Experimental public final void setHovered(boolean hovered) { hoveredProperty().set(hovered); } diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/data/ObservableProperty.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/data/ObservableProperty.java index a287c43..a574ee7 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/data/ObservableProperty.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/data/ObservableProperty.java @@ -1,6 +1,5 @@ package io.github.cottonmc.cotton.gui.widget.data; -import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; @@ -15,11 +14,9 @@ import java.util.Objects; * {@code Property}. For example, the {@code WWidget.hovered} property can be retrieved with * {@link io.github.cottonmc.cotton.gui.widget.WWidget#hoveredProperty() hoveredProperty()}. * - * @experimental * @param the contained value type * @since 4.2.0 */ -@ApiStatus.Experimental // TODO: Add filters public final class ObservableProperty implements ObservableView { private static final String DEFAULT_NAME = ""; diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/data/ObservableView.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/data/ObservableView.java index 5f6a33c..a0802ce 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/data/ObservableView.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/data/ObservableView.java @@ -1,6 +1,5 @@ package io.github.cottonmc.cotton.gui.widget.data; -import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.Nullable; import java.util.Optional; @@ -9,11 +8,9 @@ import java.util.function.Supplier; /** * A read-only {@linkplain ObservableProperty observable property}. * - * @experimental * @param the contained value type * @since 4.2.0 */ -@ApiStatus.Experimental public interface ObservableView extends Supplier { /** * {@return whether this property has been set to a value} -- cgit