public static class IlvSDMUndoManager.UndoSDMModel extends IlvFilterSDMModel
This class is made public only to provide an example of a filtering SDM data model. You do not usually need to access it directly in your code.
| Constructor and Description |
|---|
UndoSDMModel(IlvSDMModel filteredModel,
IlvSDMUndoManager undoManager)
Creates a new undo model for a specified filtered model.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEdit(UndoableEdit edit) |
void |
addObject(Object object,
Object parent,
Object before)
Adds an object to the model.
|
void |
clear()
Clears the underlying model, and discards all edits
in the undo manager.
|
UndoManager |
getUndoManager()
Returns the undo manager that holds the undoable edits
for this model.
|
void |
removeObject(Object object)
Removes an object from the model.
|
void |
setAdjusting(boolean adjusting)
Starts and ends compound edits according
to the adjusting flag.
|
void |
setFrom(Object link,
Object node)
Sets the node that is the source of the specified link.
|
void |
setID(Object obj,
String id)
Sets the identifier of an object.
|
void |
setObjectProperty(Object object,
String property,
Object value)
Sets the value of a property of an object of this model.
|
void |
setTo(Object link,
Object node)
Sets the node that is the destination of the specified link.
|
addObjectImpl, adjustmentFinished, createLink, createNode, dataChanged, getChildren, getFilteredModel, getFrom, getID, getIDImpl, getObject, getObjectProperty, getObjectPropertyNames, getObjects, getParent, getTag, getTo, isAdjusting, isEditable, isLink, linkDestinationChanged, linkSourceChanged, objectAdded, objectRemoved, propertyChanged, setFilteredModel, setIDImpladdSDMModelListener, addSDMPropertyChangeListener, allocID, contains, fireAdjustmentFinished, fireDataChanged, fireIDChanged, fireLinkDestinationChanged, fireLinkSourceChanged, fireObjectAdded, fireObjectRemoved, firePropertyChanged, firePropertyChanged, removeSDMModelListener, removeSDMPropertyChangeListenerpublic UndoSDMModel(IlvSDMModel filteredModel, IlvSDMUndoManager undoManager)
filteredModel - The model that this undo model
encapsulates.undoManager - The undo manager.public UndoManager getUndoManager()
public void clear()
clear in interface IlvSDMModelclear in class IlvFilterSDMModelpublic void setAdjusting(boolean adjusting)
setAdjusting in interface IlvSDMModelsetAdjusting in class IlvFilterSDMModeladjusting - The value of the flag.public void addEdit(UndoableEdit edit)
public void setID(Object obj, String id)
setID in interface IlvSDMModelsetID in class IlvFilterSDMModelobj - The object whose identifier is to be changed.id - The new identifier.public void addObject(Object object, Object parent, Object before)
addObject in interface IlvSDMModeladdObject in class IlvFilterSDMModelobject - The new object to add to the model.parent - The parent if the new object must be added
to a submodel, or null if the new object
is a top-level object.before - An existing object of the model before which
the new object must be inserted. You can pass null
to append the new object at the end of the model.public void removeObject(Object object)
removeObject in interface IlvSDMModelremoveObject in class IlvFilterSDMModelobject - The object to remove.public void setObjectProperty(Object object, String property, Object value)
setObjectProperty in interface IlvSDMModelsetObjectProperty in class IlvFilterSDMModelobject - The object whose property must be set.property - The name of the property to set.value - The new value of the property.public void setFrom(Object link, Object node)
setFrom in interface IlvSDMModelsetFrom in class IlvFilterSDMModellink - The link whose source node must be set.node - The new source node of the link.public void setTo(Object link, Object node)
setTo in interface IlvSDMModelsetTo in class IlvFilterSDMModellink - The link whose destination node must be set.node - The new destination node of the link.© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.