In the prior chapter, we constructed a GEF Editor and added the ability to select graphical elements in the editor. Now we explore adding commands to manipulate those selected elements, where each command encapsulates a single change to the model.
EditParts use a collection of
EditPolicy instances to specify what commands can be performed on which graphical elements. After a command is executed, it is placed on the command stack so that the user can choose to undo or redo the command at a later time.
We do not manipulate the graphical elements directly but rather modify the model and have the
EditParts listen for model changes and update the graph accordingly. If a person is removed ...