Jump to content

Graphical Editing Framework

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by MichaelLJ~enwiki (talk | contribs) at 08:36, 5 September 2006. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Just a quick writeup, please review

Graphical Editing Framework is a framework that was developed for the eclipse platform. It is known as a framework with a very steep learning curve, but it offers some benefits.

GEF consists of the following components

  • draw2d has to be used for the View components
  • Requests/Commands have to be used to edit the model
  • Palette of Tools that are offered to the user


Benefits

  • Having a Graphical Representation and being able to edit it
  • Predefined Tools for Selection, Connection Creation and others.
  • MVC (Model View Controller) Concept

MVC Concept

Model: The model has to be implemented by the user or it exists already in case of a legacy software.

Controller: The EditPart acts as a controller. Usually a GraphicalEditPart is chosen. For each model element, including connections, a specific EditPart has to be implemented. Listeners for the model have to be registered in the function EditPart.activate() and have to be unregistered within EditPart.deactivate(). If a model change is detected the view has to be updated accordingly. The EditPart knows both the model and the view. The view has to be created within .createFigure().

View: For each element within the model, including connections, a View has to be implemented, using draw2d. In order to implement the view, an implementation of IFigure of the draw2d library has to be used.

Create an eclipse-based application using the Graphical Editing Framework