Skip to content

Commit 9814080

Browse files
author
nicolaiparlog
committed
'ControlPropertyListenerBuilder' now has a code example.
1 parent f10d04d commit 9814080

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/java/org/codefx/libfx/control/properties/ControlPropertyListenerBuilder.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818
* it to check the type of the value before casting it to the type accepted by the value processor. If those types do
1919
* not match, this prevents {@link ClassCastException} (which would otherwise be caught and silently ignored). If that
2020
* case occurs frequently, specifying the type to allow the check will improve performance considerably.
21+
* <p>
22+
* A typical use looks like this:
23+
*
24+
* <pre>
25+
* ControlProperties.<Boolean> on(control.getProperties())
26+
* .forKey("visible")
27+
* .processValue(this::setVisibility)
28+
* .buildDetached();
29+
* </pre>
2130
*
2231
* @param <T>
2332
* the type of values which the listener processes

0 commit comments

Comments
 (0)