Java Reference
In-Depth Information
Finally, the Filters item has a Sort/Filter Compartment Items option,
although it seems always disabled.
Context Menu
Context menus provide a number of actions relevant to the current selection,
with some of the more important ones covered next. Note that there are also new
grouping capabilities in the runtime, although the generated diagrams do not yet
leverage these.
The Add menu lets the user add a number of shapes, notes, or plain text to
the diagram, each of which is persisted in the diagram file and is not available in
the domain model. Following is a snippet from a diagram file, showing how a
Text element and its style properties are persisted:
<children xmi:type="notation:Node" xmi:id="_Gy85wM5pEdymdqHGKqjE-g"
type="Text">
<children xmi:type="notation:Node" xmi:id="_Gy-H4M5pEdymdqHGKqjE-g"
type="DiagramName">
<element xsi:nil="true"/>
</children>
<children xmi:type="notation:Node" xmi:id="_Gy-H4c5pEdymdqHGKqjE-g"
type="Description">
<element xsi:nil="true"/>
</children>
<styles xmi:type="notation:ShapeStyle"
xmi:id="_Gy85wc5pEdymdqHGKqjE-g"
fontName="Lucida Grande"
description="Some text associated with a class"/>
<element xsi:nil="true"/>
<layoutConstraint xmi:type="notation:Bounds"
xmi:id="_Gy85ws5pEdymdqHGKqjE-g" x="423" y="261"
width="97" height="32"/>
</children>
One of the more well-hidden features that the runtime provides is the capa-
bility to export a diagram as an image file. Although this is not available from
the Eclipse main File menu as you might expect, it is available from File
Save
As Image File on the diagram context menu, along with a Print action. The dia-
log is seen in Figure 10-11. Note that this is a context-sensitive feature; the
selected element or elements appear in the image file. Selecting the canvas pro-
duces an image of the entire diagram.
The supported image file export formats are GIF, BMP, JPEG, JPG, PNG,
and SVG. The Export to HTML option creates a simple HTML page and refer-
ences the produced image.
Search WWH ::




Custom Search