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, setIDImpl
addSDMModelListener, addSDMPropertyChangeListener, allocID, contains, fireAdjustmentFinished, fireDataChanged, fireIDChanged, fireLinkDestinationChanged, fireLinkSourceChanged, fireObjectAdded, fireObjectRemoved, firePropertyChanged, firePropertyChanged, removeSDMModelListener, removeSDMPropertyChangeListener
public 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 IlvSDMModel
clear
in class IlvFilterSDMModel
public void setAdjusting(boolean adjusting)
setAdjusting
in interface IlvSDMModel
setAdjusting
in class IlvFilterSDMModel
adjusting
- The value of the flag.public void addEdit(UndoableEdit edit)
public void setID(Object obj, String id)
setID
in interface IlvSDMModel
setID
in class IlvFilterSDMModel
obj
- The object whose identifier is to be changed.id
- The new identifier.public void addObject(Object object, Object parent, Object before)
addObject
in interface IlvSDMModel
addObject
in class IlvFilterSDMModel
object
- 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 IlvSDMModel
removeObject
in class IlvFilterSDMModel
object
- The object to remove.public void setObjectProperty(Object object, String property, Object value)
setObjectProperty
in interface IlvSDMModel
setObjectProperty
in class IlvFilterSDMModel
object
- 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 IlvSDMModel
setFrom
in class IlvFilterSDMModel
link
- 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 IlvSDMModel
setTo
in class IlvFilterSDMModel
link
- The link whose destination node must be set.node
- The new destination node of the link.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.