Java Reference
In-Depth Information
diagram element. Additionally, enabling the diagram shortcut feature produces a
generated extension to the decorator provider. Small arrow decorations appear
in the bottom-left corner of shortcutted diagram elements.
A DiagramDecoratorProvider is available in the internal runtime pack-
age org.eclipse.gmf.runtime.diagram.ui.providers.internal . By
default, this provider installs a BookmarkDecorator for the diagram layer.
10.4.6 IconService
The runtime's IconService allows for the retrieval of an icon based on a hint, such
as the View class or ElementType. The service is simple in its implementation, but
as with all Services, it allows for the substitution of icons for a diagram by con-
tributing a provider of higher priority.
As shown in Figure 10-30, providers need to implement the IIconProvider
interface, as is the case with the shown DiagramIconProvider . The runtime
provides this provider, which handles icons for standard diagram notes and text.
A SharedImages class provides the DiagramIconProvider with its
ImageDescriptor s.
Figure 10-30
IconService
Search WWH ::




Custom Search