diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2022-09-06 02:25:14 +0300 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2022-09-06 02:25:14 +0300 |
commit | 8b63ebafc4e0036659c8aaa89ad678bc34637af2 (patch) | |
tree | c7c540f9cbb2ee62f32642de7b3d717b01969d80 /src | |
parent | 7d1b41c80a8e9bb308f85691547d4380af98aebe (diff) | |
download | LibGui-8b63ebafc4e0036659c8aaa89ad678bc34637af2.tar.gz LibGui-8b63ebafc4e0036659c8aaa89ad678bc34637af2.tar.bz2 LibGui-8b63ebafc4e0036659c8aaa89ad678bc34637af2.zip |
Stabilise observable properties
Diffstat (limited to 'src')
3 files changed, 0 insertions, 13 deletions
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<Boolean> hoveredProperty() { return hovered; } @@ -508,11 +505,9 @@ public class WWidget { * Returns whether the user is hovering over this widget. * This is equivalent to calling <code>{@link #hoveredProperty()}.get()</code>. * - * @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 <code>{@link #hoveredProperty()}.set(<i>hovered</i>)</code>. * - * @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 name>Property}. For example, the {@code WWidget.hovered} property can be retrieved with * {@link io.github.cottonmc.cotton.gui.widget.WWidget#hoveredProperty() hoveredProperty()}. * - * @experimental * @param <T> the contained value type * @since 4.2.0 */ -@ApiStatus.Experimental // TODO: Add filters public final class ObservableProperty<T> implements ObservableView<T> { private static final String DEFAULT_NAME = "<unnamed>"; 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 <T> the contained value type * @since 4.2.0 */ -@ApiStatus.Experimental public interface ObservableView<T> extends Supplier<T> { /** * {@return whether this property has been set to a value} |