Java Reference
In-Depth Information
As implied by the second bullet, GMF provides a separation of diagram and
domain model. Although both can be persisted in a single file, the runtime pro-
vides for automatic persistence of all notational information (position of ele-
ments, color, font, and so on), requiring the Toolsmith to provide only a domain
model. From the Practitioner's perspective, it is likely irrelevant that two models
are used under the hood; the Practitioner more likely will use the diagram as the
primary editing interface and will not distinguish between the two. Note, how-
ever, that a diagram can display multiple domains, many diagrams can provide
views of a single domain, or a diagram can even provide multiple visual elements
for the same underlying domain element. The runtime handles all these cases,
which were motivators for keeping visual and domain information persisted
separately.
As we covered in Chapter 9, “Graphical Editing Framework,” a Model-
View-Controller (MVC) architecture is used in the framework. GMF's runtime
builds upon this architecture, providing significant capabilities, but also intro-
ducing significant complexity. The goal of these enhancements is to provide a
platform for extensibility so that editors can be scalable through plug-in points
and service provider interfaces.
This chapter explores in detail the functionality that the GMF runtime pro-
vides, beginning with a closer look at what a GMF-based diagram offers.
10.1.1 General Diagram Features
This section looks at each of the provided diagram runtime features. Each dia-
gram is provided these features by default, or by making certain property
changes in the gmfgen model if using the tooling component of GMF. Although
some of what's described here is available from GEF, much of it is provided
by GMF.
Toolbar
Many common diagramming functions are available in the main toolbar. You
can modify the properties of selected diagram elements that display text by using
the toolbar font, font size, bold, and italic toolbar items. To their right, you can
adjust the font color, fill color, and line color for the selected element. Note that
all these functions are also available in the Properties view.
Search WWH ::




Custom Search