Graphical Editing Framework: Difference between revisions

Content deleted Content added
Line 20:
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.
 
== GEF Design patterns frequently ==
In addition to MVC, GEF developers/enthusiasts need to have a good under standing of [[Design Patterns]]. The most recurring design patterns under GEF are [[Factory_method_pattern|Factory]], [[Chain-of-responsibility pattern|Chain of responsibility]], [[Command pattern|Command]], [[Observer pattern|Observer]] and [[State pattern|State]]. These patterns are often mandatory under GEF, for instance EditPartFactory implementation. Certain aspects of GEF code can be correlated to these. The jargon (italicized text) is strictly GEF specific.
* Factory : Creating models from palette, creating <i>editparts</i> and creating figures
* Observer : Typically a controller ( read <i>editpart</i>) listening on Model and View.
* Chain of Responsibility : To decide which <i>EditPolicy</i> should handle a <i>Request</i>.
* State pattern: A typical example of which is opening editors for an input model .
 
Note that the usage of patterns is not restricted to those listed here.
 
== GMF and EMF ==