Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
GEF/GEF4/Zest
Note to non-wiki readers: This documentation is generated from the Eclipse wiki - if you have corrections or additions it would be awesome if you added them in the original wiki page.
Contents
Introduction
GEF4 Zest is a graph visualization component that can be used to visualize GEF4 Graph-based graph models, applying automatic layout as provided by GEF4 Layout. It uses JavaFX and GEF4 FX for visualization purposes and is internally based on GEF4 MVC.
Layout Implementations
The GEF4 Layout interfaces are adopted to the GEF4 Graph data model. The layout objects are constructed from a given Graph object.
Properties
The layout objects support a general properties map. The specific properties for which interface methods are defined are implemented using this properties map.
When transferring the graph objects into layout objects, the attributes of the graph objects are examined, altering the layout objects as follows:
- LABEL
Contains the label of the node/edge. - EDGE_STYLE
Specifies if the edge should be drawn solid, dashed, or dotted. - GRAPH_TYPE
Specifies whether edges are directed or undirected.
MVC
The GEF4 MVC component is used as the framework for the viewer.
The ContentParts are implemented for the GEF4 Graph data model:
- GraphContentPart
- NodeContentPart
- EdgeContentPart
An ILayoutModel is used to distribute the LayoutContext to all ContentParts. A GraphRootPart is used to construct the LayoutContext and set it on the ILayoutModel.
ILayoutModel
The ILayoutModel holds a LayoutContext.
GraphRootPart
The GraphRootPart stores a LayoutContext in the ILayoutModel. That LayoutContext is created when the viewer's content changes. The GraphRootPart does also listen to viewport changes to trigger a re-layout.
ZestFXExampleView
The ZestFXExampleView is a viewer for an example graph:
Migration from Zest 1.x to GEF4 Zest
GEF4 Zest was mostly written from scratch, replacing the Zest 1.x API as well as the provisional Zest 2.x API ( Zest 2.0 Layout API) that was developed as an intermediate step.
TODO: Provide detailed information on how to migrate from Zest 1.x to GEF4 Zest, as indicated within bugzilla #441131.