Example Component
Syntax:
<cmp border="border-label" style="style-label" overlay="overlay-label" color="color-label"
highlight="highlight-label" text-highlight="text-highlight-label">text</cmp>
Example: <cmp style="Outsourced"
overlay="Reference">Outsourced reference
compo­nent</cmp>
Use: An example component that appears in the legend with
details on how to draw it.
The cmp
component describes how to draw an example component
in the legend. The values of the attributes are the label
attribute of the corresponding element. For example, for a component to be
drawn with the outsourced style described in <cmp
style="Outsourced"/>
, there must be an element <style
label="Outsourced" …>
.
Any combination of these attributes is valid. However, despite the fact
that multiple styles can apply to a component, only one can be used at a time
in a legend cmp
.
Any text (value
attribute or text content of an element)
that appears in braces is replaced with the equivalent value from the model.
Hence, in the preceding example, the text {@ver}
is replaced by
the ver
attribute of the <model>
element in the
calling Model XML file. This allows values in the legend based on details in
the model, without having to hardcode them into the Shapes XML file. This makes
it easier to reuse the same Shapes XML file for multiple models.