Package snap.props
Class PropChange
java.lang.Object
snap.props.PropChange
- Direct Known Subclasses:
TextBlockUtils.CharsChange
,TextBlockUtils.LineStyleChange
,TextBlockUtils.StyleChange
A class to describe object property changes.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
An interface for objects that can do a PropChange. -
Constructor Summary
ConstructorDescriptionPropChange
(Object aSource, String aProp, Object oldVal, Object newVal) Constructor.PropChange
(Object aSource, String aProp, Object oldVal, Object newVal, int anIndex) Constructor with index. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Does this change with given new/old values.static void
Performs the given change by using RMKey.setValue or RMKeyList add/remove.int
getIndex()
Returns the index.Returns the new value.Returns the old value.Returns the Property name.Returns the Property name.Returns the source.merge
(PropChange anEvent) Attempts to merge the given property change into this property change.void
Redoes this change.toString()
Simple to string.void
Undoes this change.
-
Constructor Details
-
PropChange
Constructor. -
PropChange
Constructor with index.
-
-
Method Details
-
getSource
Returns the source. -
getPropName
Returns the Property name. -
getPropertyName
Returns the Property name. -
getOldValue
Returns the old value. -
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
Does this change with given new/old values. -
merge
Attempts to merge the given property change into this property change. -
toString
Simple to string. -
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.
-