Java Reference
In-Depth Information
A static initializer loads our link image, which is just the Eclipse internal Web
browser icon. The getDecoratorTargetNode() method returns the View
node if it contains our CustomStyle added earlier. The refresh() method is
responsible for installing the decorator on the node if the hyperlink property of
our custom style is present. The decorator is added to the top-right corner of the
node, as shown in Figure 10-57. Notice also from the code that a
NotificationListener invokes the refresh() method, while the acti-
vate() and deactivate() methods add and remove the listener for our
Custom Style hyperlink property, respectively.
Figure 10-57
Figure decorator
10.10 Beyond GEF and Draw2d
In a number of places, the GMF runtime extends GEF. In this section, we look
into the org.eclipse.gmf.runtime.*gef* and *draw2d* packages to see
what additional layouts, figures, and so on are available from GMF. Some of
these classes possibly will move into GEF in the future, and some of the elements
currently found in *.internal.* namespaces might become public. Either way,
they provide a good source of additional capabilities and inspiration for creating
your own GEF elements.
Figure 10-58 is a diagram of the org.eclipse.gmf.runtime.draw2d.
ui.figures package. You've seen some of these elements in our generated and
custom code, such as the OneLineBorder and WrappingLabel classes.
 
Search WWH ::




Custom Search