Appendix C. Changeable GUIs with Draw2D
The SWT/JFace toolset has two shortcomings that we haven’t addressed. The first involves building truly custom widgets. Because it relies on native widgets, SWT/JFace makes it difficult to extend the Control class. So, you can’t create your own components.
SWT/JFace’s second deficiency involves building graphical editors. These applications are similar to normal GUIs, but they allow you to manipulate diagrams and save their models to a file. Generally, these diagrams represent large systems, like those found in Computer-Aided Design (CAD), Unified Modeling Language (UML) software, and graphical software development tools such as Microsoft’s Visual Studio. With great pains, SWT/JFace can be used to build a graphical editor, but the toolset wasn’t designed for this purpose. We need a tool that specifically addresses the requirements of building graphical editors.
In response to these concerns, the Eclipse designers created the Draw2D and Graphical Editing Framework (GEF) libraries. The Draw2D tool lets you render GUI components with whatever appearance and functionality you prefer. It provides this capability by creating a high-level drawing region that operates independently from the native platform. The GEF library combines these Draw2D figures into a framework suitable for graphical editing.