Class EditorHelper
java.lang.Object
com.inductiveautomation.ignition.client.jsonedit.EditorHelper
Encapsulates some logic useful in the editors to facilitate correct editing and listening of/to a node's value
and prevent notification looping
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Removes node listenersboolean
Can be checked to prevent UI listeners from updating the node's value.newItemListener
(Consumer<Boolean> realListener) Convenience function that makes an ItemListener that will automatically ignore events while the updatingUi flag is set.void
Sets the value in such a way that the resulting value change event won't re-trigger the ui to update.void
Any code that updates the UI should be put through here, that way the updating flag can be set and then used to prevent other ui listeners from firing.
-
Constructor Details
-
EditorHelper
- Parameters:
updateUiFromNodeValue
- Called when the node's value changes. Update the UI here. will automatically be called inside the updateUI wrapper.
-
-
Method Details
-
destroy
public void destroy()Removes node listeners -
newItemListener
Convenience function that makes an ItemListener that will automatically ignore events while the updatingUi flag is set. -
isUpdatingUi
public boolean isUpdatingUi()Can be checked to prevent UI listeners from updating the node's value. -
setValue
Sets the value in such a way that the resulting value change event won't re-trigger the ui to update. -
updateUi
Any code that updates the UI should be put through here, that way the updating flag can be set and then used to prevent other ui listeners from firing.
-