Package com.inductiveautomation.rm.base
Class RMPropertyChangeUtils
java.lang.Object
com.inductiveautomation.rm.base.RMPropertyChangeUtils
Utilities for property changes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Performs the given change by using RMKey.setValue or RMKeyList add/remove.static void
doChanges
(Object aSource, List<PropertyChangeEvent> theChanges) Performs a list of changes.static void
doChanges
(List<PropertyChangeEvent> theChanges) Performs a list of changes.static int
getIndex
(PropertyChangeEvent anEvent) Returns the index for a property change event (assuming it's indexed).static Object
getParent
(PropertyChangeEvent anEvent) Returns the parent for a property change event (assuming it's forwarded from a parent).static PropertyChangeEvent
merge
(PropertyChangeEvent anEvent1, PropertyChangeEvent anEvent2) Attempts to merge the second property change into the first property change.static RMPropertyChangeEvent
mergeImpl
(PropertyChangeEvent anEvent1, PropertyChangeEvent anEvent2) Attempts to merge the second property change into the first property change.static void
redoChange
(PropertyChangeEvent anEvent) Re-performs the given change.static void
redoChange
(Object aSource, PropertyChangeEvent anEvent) Re-performs the given change on the given object.static void
undoChange
(PropertyChangeEvent anEvent) Reverses the given change.static void
undoChange
(Object aSource, PropertyChangeEvent anEvent) Reverses the given change.static void
undoChanges
(Object aSource, List<PropertyChangeEvent> theChanges) Reverts a list of changes.static void
undoChanges
(List<PropertyChangeEvent> theChanges) Reverts a list of changes.
-
Constructor Details
-
RMPropertyChangeUtils
public RMPropertyChangeUtils()
-
-
Method Details
-
getParent
Returns the parent for a property change event (assuming it's forwarded from a parent). -
getIndex
Returns the index for a property change event (assuming it's indexed). -
undoChange
Reverses the given change. -
undoChange
Reverses the given change. -
redoChange
Re-performs the given change. -
redoChange
Re-performs the given change on the given object. -
doChanges
Performs a list of changes. -
doChanges
Performs a list of changes. -
undoChanges
Reverts a list of changes. -
undoChanges
Reverts a list of changes. -
doChange
public static void doChange(Object aSource, String aProperty, Object oldValue, Object newValue, int anIndex) Performs the given change by using RMKey.setValue or RMKeyList add/remove. -
merge
Attempts to merge the second property change into the first property change. -
mergeImpl
public static RMPropertyChangeEvent mergeImpl(PropertyChangeEvent anEvent1, PropertyChangeEvent anEvent2) Attempts to merge the second property change into the first property change.
-