Skip to content

Commit

Permalink
Added missing documentation for readonly properties. (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikmaeckel committed Sep 14, 2021
1 parent 28f41ed commit 2744bee
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion docs/concepts/observable/observable.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,20 @@ layout: default
[BooleanPropertyKDoc]: https://tudo-aqua.github.io/bgw/kotlin-docs/bgw-core/tools.aqua.bgw.observable/-boolean-property/index.html
[IntegerPropertyKDoc]: https://tudo-aqua.github.io/bgw/kotlin-docs/bgw-core/tools.aqua.bgw.observable/-integer-property/index.html
[DoublePropertyKDoc]: https://tudo-aqua.github.io/bgw/kotlin-docs/bgw-core/tools.aqua.bgw.observable/-double-property/index.html
[LimitedDoublePropertyKDoc]: https://tudo-aqua.github.io/bgw/kotlin-docs/bgw-core/tools.aqua.bgw.observable.properties/-limited-double-property/index.html
[StringPropertyKDoc]: https://tudo-aqua.github.io/bgw/kotlin-docs/bgw-core/tools.aqua.bgw.observable/-string-property/index.html

[ReadonlyPropertyKDoc]: https://tudo-aqua.github.io/bgw/kotlin-docs/bgw-core/tools.aqua.bgw.observable.properties/-readonly-property/index.html
[ReadonlyBooleanPropertyKDoc]: https://tudo-aqua.github.io/bgw/kotlin-docs/bgw-core/tools.aqua.bgw.observable/-readonly-boolean-property/index.html
[ReadonlyIntegerPropertyKDoc]: https://tudo-aqua.github.io/bgw/kotlin-docs/bgw-core/tools.aqua.bgw.observable/-readonly-integer-property/index.html
[ReadonlyDoublePropertyKDoc]: https://tudo-aqua.github.io/bgw/kotlin-docs/bgw-core/tools.aqua.bgw.observable/-readonly-double-property/index.html
[ReadonlyStringPropertyKDoc]: https://tudo-aqua.github.io/bgw/kotlin-docs/bgw-core/tools.aqua.bgw.observable/-readonly-string-property/index.html

[ObservableListKDoc]: https://tudo-aqua.github.io/bgw/kotlin-docs/bgw-core/tools.aqua.bgw.observable/-observable-list/index.html
[ObservableArrayListKDoc]: https://tudo-aqua.github.io/bgw/kotlin-docs/bgw-core/tools.aqua.bgw.observable/-observable-array-list/index.html
[ObservableLinkedListKDoc]: https://tudo-aqua.github.io/bgw/kotlin-docs/bgw-core/tools.aqua.bgw.observable/-observable-linked-list/index.html

[IllegalArgumentExceptionKDoc]: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-argument-exception/
<!-- Start Page -->
# Observable

Expand All @@ -44,7 +52,7 @@ by [Property#addListener][addListenerKDoc]
or [Property#addListenerAndInvoke][addListenerAndInvokeKDoc]
which also invokes it with the given value. Note that the given value is not set to the backing field. Every time the
value of this observable is set it invokes all listeners if and only if the new value is not equal the old one. If
all listeners with the current value should be invoked, use [Property#notifyUnchanged][notifyUnchangedKDoc].
all listeners should be invoked with the current value, use [Property#notifyUnchanged][notifyUnchangedKDoc].

For common data types there are dedicated classes:
* [BooleanProperty][BooleanPropertyKDoc]
Expand All @@ -54,6 +62,16 @@ For common data types there are dedicated classes:

For generic types use the baseclass [Property<T>][PropertyKDoc].

The [LimitedDoubleProperty][LimitedDoublePropertyKDoc] behaves like a [DoubleProperty][DoublePropertyKDoc]
but throws an [IllegalArgumentException][IllegalArgumentExceptionKDoc] is a value is set that exceeds its bounds given as constructor parameter.

The framework uses equivalent [ReadonlyProperties][ReadonlyPropertyKDoc] for one way communication. These come in the same variety:
* [ReadonlyBooleanProperty][ReadonlyBooleanPropertyKDoc]
* [ReadonlyIntegerProperty][ReadonlyIntegerPropertyKDoc]
* [ReadonlyDoubleProperty][ReadonlyDoublePropertyKDoc]
* [ReadonlyStringProperty][ReadonlyStringPropertyKDoc]
* [ReadonlyProperty<T>][ReadonlyPropertyKDoc].

## Observable Lists

The [ObservableList][ObservableListKDoc] work exactly like Properties. It provides all standard list operations and notifies listeners every
Expand Down

0 comments on commit 2744bee

Please sign in to comment.