public class PropertyChangeEdit
extends javax.swing.undo.AbstractUndoableEdit
UndoableEdit
event which can undo a change of a JavaBeans property.Constructor and Description |
---|
PropertyChangeEdit(java.lang.Object source,
java.lang.String propertyName,
boolean oldValue,
boolean newValue)
Creates a new PropertyChangeEdit.
|
PropertyChangeEdit(java.lang.Object source,
java.lang.String propertyName,
char oldValue,
char newValue)
Creates a new PropertyChangeEdit.
|
PropertyChangeEdit(java.lang.Object source,
java.lang.String propertyName,
java.lang.Class<T> type,
T oldValue,
T newValue)
Creates a new PropertyChangeEdit.
|
PropertyChangeEdit(java.lang.Object source,
java.lang.String propertyName,
double oldValue,
double newValue)
Creates a new PropertyChangeEdit.
|
PropertyChangeEdit(java.lang.Object source,
java.lang.String propertyName,
float oldValue,
float newValue)
Creates a new PropertyChangeEdit.
|
PropertyChangeEdit(java.lang.Object source,
java.lang.String propertyName,
int oldValue,
int newValue)
Creates a new PropertyChangeEdit.
|
PropertyChangeEdit(java.lang.Object source,
java.lang.String propertyName,
long oldValue,
long newValue)
Creates a new PropertyChangeEdit.
|
PropertyChangeEdit(java.lang.Object source,
java.lang.String propertyName,
java.lang.String oldValue,
java.lang.String newValue)
Creates a new PropertyChangeEdit.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addEdit(javax.swing.undo.UndoableEdit anEdit)
Adds the specified edit to this one, if it is a
PropertyChangeEdit
from the same owner and the same property. |
java.lang.String |
getPresentationName()
Returns the presentation name of the undoable edit.
|
protected java.lang.reflect.Method |
getSetter()
Returns the setter for the property.
|
void |
redo()
Redoes the change.
|
void |
setPresentationName(java.lang.String presentationName)
Sets the presentation name of the undoable edit.
|
java.lang.String |
toString()
Returns a string representation of this object useful for debugging.
|
void |
undo()
Undoes the change.
|
public PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, java.lang.Class<T> type, T oldValue, T newValue)
public PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, boolean oldValue, boolean newValue)
public PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, int oldValue, int newValue)
public PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, long oldValue, long newValue)
public PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, float oldValue, float newValue)
public PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, double oldValue, double newValue)
public PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, char oldValue, char newValue)
public PropertyChangeEdit(java.lang.Object source, java.lang.String propertyName, java.lang.String oldValue, java.lang.String newValue)
protected java.lang.reflect.Method getSetter()
public void undo() throws javax.swing.undo.CannotRedoException
undo
in interface javax.swing.undo.UndoableEdit
undo
in class javax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CannotRedoException
public void redo() throws javax.swing.undo.CannotRedoException
redo
in interface javax.swing.undo.UndoableEdit
redo
in class javax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CannotRedoException
public java.lang.String getPresentationName()
getPresentationName
in interface javax.swing.undo.UndoableEdit
getPresentationName
in class javax.swing.undo.AbstractUndoableEdit
public void setPresentationName(java.lang.String presentationName)
public boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
PropertyChangeEdit
from the same owner and the same property.addEdit
in interface javax.swing.undo.UndoableEdit
addEdit
in class javax.swing.undo.AbstractUndoableEdit
anEdit
- Edit to be added.public java.lang.String toString()
toString
in class javax.swing.undo.AbstractUndoableEdit