Class RMPropertyChangeUtils


  • public class RMPropertyChangeUtils
    extends java.lang.Object
    Utilities for property changes.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void doChange​(java.lang.Object aSource, java.lang.String aProperty, java.lang.Object oldValue, java.lang.Object newValue, int anIndex)
      Performs the given change by using RMKey.setValue or RMKeyList add/remove.
      static void doChanges​(java.lang.Object aSource, java.util.List<java.beans.PropertyChangeEvent> theChanges)
      Performs a list of changes.
      static void doChanges​(java.util.List<java.beans.PropertyChangeEvent> theChanges)
      Performs a list of changes.
      static int getIndex​(java.beans.PropertyChangeEvent anEvent)
      Returns the index for a property change event (assuming it's indexed).
      static java.lang.Object getParent​(java.beans.PropertyChangeEvent anEvent)
      Returns the parent for a property change event (assuming it's forwarded from a parent).
      static java.beans.PropertyChangeEvent merge​(java.beans.PropertyChangeEvent anEvent1, java.beans.PropertyChangeEvent anEvent2)
      Attempts to merge the second property change into the first property change.
      static RMPropertyChangeEvent mergeImpl​(java.beans.PropertyChangeEvent anEvent1, java.beans.PropertyChangeEvent anEvent2)
      Attempts to merge the second property change into the first property change.
      static void redoChange​(java.beans.PropertyChangeEvent anEvent)
      Re-performs the given change.
      static void redoChange​(java.lang.Object aSource, java.beans.PropertyChangeEvent anEvent)
      Re-performs the given change on the given object.
      static void undoChange​(java.beans.PropertyChangeEvent anEvent)
      Reverses the given change.
      static void undoChange​(java.lang.Object aSource, java.beans.PropertyChangeEvent anEvent)
      Reverses the given change.
      static void undoChanges​(java.lang.Object aSource, java.util.List<java.beans.PropertyChangeEvent> theChanges)
      Reverts a list of changes.
      static void undoChanges​(java.util.List<java.beans.PropertyChangeEvent> theChanges)
      Reverts a list of changes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RMPropertyChangeUtils

        public RMPropertyChangeUtils()
    • Method Detail

      • getParent

        public static java.lang.Object getParent​(java.beans.PropertyChangeEvent anEvent)
        Returns the parent for a property change event (assuming it's forwarded from a parent).
      • getIndex

        public static int getIndex​(java.beans.PropertyChangeEvent anEvent)
        Returns the index for a property change event (assuming it's indexed).
      • undoChange

        public static void undoChange​(java.beans.PropertyChangeEvent anEvent)
        Reverses the given change.
      • undoChange

        public static void undoChange​(java.lang.Object aSource,
                                      java.beans.PropertyChangeEvent anEvent)
        Reverses the given change.
      • redoChange

        public static void redoChange​(java.beans.PropertyChangeEvent anEvent)
        Re-performs the given change.
      • redoChange

        public static void redoChange​(java.lang.Object aSource,
                                      java.beans.PropertyChangeEvent anEvent)
        Re-performs the given change on the given object.
      • doChanges

        public static void doChanges​(java.util.List<java.beans.PropertyChangeEvent> theChanges)
        Performs a list of changes.
      • doChanges

        public static void doChanges​(java.lang.Object aSource,
                                     java.util.List<java.beans.PropertyChangeEvent> theChanges)
        Performs a list of changes.
      • undoChanges

        public static void undoChanges​(java.util.List<java.beans.PropertyChangeEvent> theChanges)
        Reverts a list of changes.
      • undoChanges

        public static void undoChanges​(java.lang.Object aSource,
                                       java.util.List<java.beans.PropertyChangeEvent> theChanges)
        Reverts a list of changes.
      • doChange

        public static void doChange​(java.lang.Object aSource,
                                    java.lang.String aProperty,
                                    java.lang.Object oldValue,
                                    java.lang.Object newValue,
                                    int anIndex)
        Performs the given change by using RMKey.setValue or RMKeyList add/remove.
      • merge

        public static java.beans.PropertyChangeEvent merge​(java.beans.PropertyChangeEvent anEvent1,
                                                           java.beans.PropertyChangeEvent anEvent2)
        Attempts to merge the second property change into the first property change.
      • mergeImpl

        public static RMPropertyChangeEvent mergeImpl​(java.beans.PropertyChangeEvent anEvent1,
                                                      java.beans.PropertyChangeEvent anEvent2)
        Attempts to merge the second property change into the first property change.