Java Reference
In-Depth Information
How can I change a property of a figure when a domain property changes?
The most straightforward approach is to override the handleNotifi-
cationEvent() method in the EditPart and determine whether the change
was on the domain property of interest. If so, update the corresponding figure
accordingly. Section 4.3.5, “Subtopic Figure,” gives an example of a domain
change being detected to invoke diagram layout.
How can I make my figure nonresizable?
Using code, you install a NonResizeableEditPolicy for the
EditPolicy.LAYOUT_ROLE . To accomplish this in the definition model, set the
Resize Constraint of the Node element to NONE and provide a Default Size
Facet, as illustrated in Section 4.5.1, “Gateways.”
What does canonical mean in the context of GMF?
In terms of the runtime, canonical refers to the capability of a container to
maintain its children views in synchronization with their underlying domain ele-
ments. For example, consider a compartment within a Class element in a UML
diagram. New elements added to the underlying domain model are synchronized
with the compartment view automatically. In this case, the compartment is a
canonical container and keeps track of changes to its children.
Why can't I see elements I place on the diagram?
This can happen when you use certain versions of Linux that might not have
the Cairo graphics library installed or that have Windows 2000 without the
GDI+ library. The selection border for elements typically is shown, so try using
Select All (Ctrl+A) to verify this. If this is your issue, install the missing libraries.
You can also disable anti-aliasing for the diagram to resolve the problem; this
option is available in the preferences of your diagram.
12.3 Tooling FAQs
The FAQs in this section relate to using the GMF Tooling models for diagram
generation.
How do I modify the output of the generation templates?
You can modify the templates for both figure generation and diagram code
using the extensibility options provided by the underlying Xpand model-to-text
framework. This topic explores each of these techniques. See Section 4.2.3,
“Customization Options,” for a general overview and Sections 4.6.5, “Gradient
Figures,” and 4.6.6, “Color Preferences,” for specific examples.
 
Search WWH ::




Custom Search