indicates a setter method that receives a notifier for the target member
@GuiIncluded
class C {
@GuiIncluded public int value;
@GuiIncluded public String name;
Runnable valueNotifier;
Runnable nameNotifier;
Runnable selfNotifier;
{
new Thread(() -> {
while (true) {
if (valueNotifier != null) valueNotifier.run();
if (nameNotifier != null) nameNotifier.run();
if (selfNotifier != null) selfNotifier.run();
sleep();
}
}).start();
}
//updater for the pane of the property "value" from the setter name "set...Notifier"
@GuiNotifierSetter
public void setValueNotifier(Runnable notifier) {
this.valueNotifier = notifier;
}
//updater for the pane of the property "name"
@GuiNotifierSetter(target="name")
public void setNameUpdater(Runnable notifier) {
this.nameNotifier = notifier;
}
//updater for the pane of the entire pane of the C object
@GuiNotifierSetter
public void setNotifier(Runnable notifier) {
this.selfNotifier = notifier;
}
...
}
- Since:
- 1.2
-
Field Details
-
TARGET_SELF
- See Also:
-
TARGET_FROM_NAME
- See Also:
-
TARGET_ROOT
- See Also:
-
-
Element Details
-
target
String target- Returns:
- the name of the target of notifying,
can be another property name (starting with a small-case letter) or
TARGET_SELFmeaning the owner type itself,TARGET_FROM_NAMEmeaning that the name is determined by the name of the attached setter "setTargetNotifier" as default, orTARGET_ROOTmeaning the entire pane from the root.
- Default:
"-"
-