Purpose
The border styles values XML file is used to define the border styles
of components. The valid values for a border style can be any CSS property of
an SVG shape.
Note: For more information, see
Scalable Vector Graphics (SVG) 1.1
Specification.
The CSS applies to the shape of the component and it can control the
stroke width, and dash pattern as well as the overall opacity. It cannot set
the stroke or text colors.
Syntax
<?xml version="1.0"?>
<values default="default-border style-value" label="label for legend">
<item label="label for legend" value="border style-value">
<component name="component-name"/>
<component name="component-name"/>
<component name="component-name"/>
…
</item>
<item …>
…
</item>
…
</values>
In the preceding syntax, the values
tag contains the
item
tags. The various attributes under the values
tag are:
-
default="default-border style-value"
: Defines the
default border style for the components. This default value gets assigned to
the components to which no border style value is assigned.
-
label="label for legend"
: Defines the label for the
legend.
Each item
tag can contain the following attributes:
-
label="label for legend"
: Defines the label for the
legend.
-
value="border style-value"
: Defines the border style
value for the item. This border style value gets assigned to all the components
listed in that item
tag.
The item
tag also contains component
tags to
specify the components in the item. All the components defined in an
item
tag have the same border style. The following is the syntax
to define a component:
<component name="component-name"/>
Where component-name
indicates the name of the component
defined in the system definition file.
Example
<?xml version="1.0"?>
<values default="stroke-width: 0.4">
<item label="Plugin" value="stroke-width: 2">
<component name="SD Card Driver"/>
<component name="Audio Driver"/>
</item>
</values>
The following figure shows the generated legend for the preceding
border styles values XML: