public class IlvNodePropertyChangeEdit extends IlvAbstractDataContainerUndoableEdit
IlvAbstractDataContainerUndoableEdit for
changing the property of a node of a data container.RedoName, UndoName| Constructor and Description |
|---|
IlvNodePropertyChangeEdit(IlvDataContainer dataContainer,
Object parent,
Object node,
int index,
String propertyName,
Object oldValue,
Object newValue)
Creates an edit that changes a property of a node of a data container.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getIndex()
Returns the index of the node in the child array of its parent.
|
Object |
getNewValue()
Returns the new value of the property.
|
Object |
getNode()
Returns the node to change the property of.
|
Object |
getOldValue()
Returns the value of the property before it was changed.
|
Object |
getParentNode()
Returns the parent of the node to change the property of.
|
String |
getPropertyName()
Returns the name of the property to change the value of.
|
void |
redo()
Sets the property of the node with the name given by
getPropertyName()
to the value given by getNewValue(). |
void |
undo()
Sets the property of the node with the name given by
getPropertyName()
to the value given by getOldValue(). |
getDataContaineraddEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toStringpublic IlvNodePropertyChangeEdit(IlvDataContainer dataContainer, Object parent, Object node, int index, String propertyName, Object oldValue, Object newValue)
dataContainer - The data container that contains the node to change
a property of.parent - The parent of the node to change a property of - can be
null.node - The node to change the property of.index - The index of the node in the
child array of the parent node.propertyName - The name of the property to change.oldValue - The value of the property before it was changed.newValue - The new value of the property.public Object getParentNode()
public Object getNode()
public int getIndex()
public String getPropertyName()
public Object getOldValue()
getNewValue(),
getPropertyName()public Object getNewValue()
getOldValue(),
getPropertyName()public void undo()
throws CannotUndoException
getPropertyName()
to the value given by getOldValue().undo in interface UndoableEditundo in class AbstractUndoableEditCannotUndoExceptionAbstractUndoableEdit.canUndo()public void redo()
throws CannotRedoException
getPropertyName()
to the value given by getNewValue().redo in interface UndoableEditredo in class AbstractUndoableEditCannotRedoExceptionAbstractUndoableEdit.canRedo()© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.