[28:7] extends: FxObj
Wraps FXGL's PropertyMapChangeListener two-method interface (com.almasb.fxgl.core.collection.PropertyMapChangeListener). Fires onUpdated(key, value) whenever a property is added or its value changes, and onRemoved(key, value) when a property is removed from the map. Backed by AussomPropertyMapChangeListener because the interface has two methods (aji.closure only handles single-method functional interfaces). Register the listener via PropertyMap.addListener(listener.obj). Example: pm = new PropertyMap(); listener = new PropertyMapChangeListener(::onUpdated, ::onRemoved); pm.addListener(listener.obj); public onUpdated(key, value) { ... } public onRemoved(key, value) { ... }
PropertyMapChangeListener (callback OnUpdated = null, callback OnRemoved = null)
Creates a new PropertyMapChangeListener with the given Aussom callbacks. Either may be null to ignore that event class.
OnUpdated is a callback (string key, value) -> any.OnRemoved is a callback (string key, value) -> any.adopt (object Ajo)
Wraps an existing PropertyMapChangeListener AussomJavaObject.
onUpdated (string Key, object Value)
Triggers the onUpdated callback. The engine normally drives this when a property in the map gains or changes value.
onRemoved (string Key, object Value)
Triggers the onRemoved callback.