Package snap.props

Class PropChange

java.lang.Object
snap.props.PropChange
Direct Known Subclasses:
TextDocUtils.CharsChange, TextDocUtils.LineStyleChange, TextDocUtils.StyleChange

public class PropChange extends Object
A class to describe object property changes.
  • Constructor Details

    • PropChange

      public PropChange(Object aSource, String aProp, Object oldVal, Object newVal)
      Constructor.
    • PropChange

      public PropChange(Object aSource, String aProp, Object oldVal, Object newVal, int anIndex)
      Constructor with index.
  • Method Details

    • getSource

      public Object getSource()
      Returns the source.
    • getPropName

      public String getPropName()
      Returns the Property name.
    • getPropertyName

      public String getPropertyName()
      Returns the Property name.
    • getOldValue

      public Object getOldValue()
      Returns the old value.
    • getNewValue

      public Object getNewValue()
      Returns the new value.
    • getIndex

      public int getIndex()
      Returns the index.
    • undoChange

      public void undoChange()
      Undoes this change.
    • redoChange

      public void redoChange()
      Redoes this change.
    • doChange

      protected void doChange(Object oldVal, Object newVal)
      Does this change with given new/old values.
    • merge

      public PropChange merge(PropChange anEvent)
      Attempts to merge the given property change into this property change.
    • toString

      public String toString()
      Simple to string.
      Overrides:
      toString in class Object
    • doChange

      public static void doChange(Object aSource, String aProp, Object oldVal, Object newVal, int anIndex)
      Performs the given change by using RMKey.setValue or RMKeyList add/remove.