Java Reference
In-Depth Information
Figure 10-11
Save as Image File dialog
The diagram canvas has a number of other items duplicated in the Diagram
main menu described earlier, but it also has a Show Properties View item that
opens the Properties view, if it is not already open. Note that generated GMF dia-
grams also include a Load Resource option that is the same action available in
generated EMF editors. This enables the user to load another model file into the
resource set. Optionally, generated diagrams include a Create Shortcut menu
item and allow the selection of related diagram elements to be added to the dia-
gram. Section 11.4.2, “Contains Shortcuts To and Shortcuts Provided For,” cov-
ers this capability.
Selected element context menus offer a number of specific menu items,
including the familiar Cut, Copy, and Paste. A Duplicate action is also available.
Finally, two delete menu items are available. Delete from Model is the functional
menu item, while Delete from Diagram is one you would expect to see active in
the case of diagram shortcuts, where only the notational element is to be
removed from the diagram. Additionally, because the default generated diagrams
are synchronized with the domain, the Delete from Diagram option doesn't make
sense. A synchronization property in the GMF generator model determines the
mode of operation.
Connection Handles
When the mouse is hovered over an element, whether it is selected or not, con-
nection handles appear that you can use to create connections and even to
prompt the user with possible options to create new diagram elements and a cor-
responding connection. Connection handles are shown in Figure 10-12.
Search WWH ::




Custom Search