Components
There are four elements in an Format Trait Info (.fti) file.
<Classes>
The only child element in <Classes> is <Class>. <Class> has a child element of <Item>. See Example 1 for sample code.
To facilitate organization, values for a given option may be grouped together as <Items> in a <Class>. The <Class> element can then be applied in the <Settings> and <RuleTraitsSet> elements to declare the options available for that specific option.
<Classes>
<Class name="boolean">
<Item value="true" stringid="boolean-true" />
<Item value="false" stringid="boolean-false" />
</Class>
<Class name="color-name">
<Item value="transparent" />
<Item value="aqua" />
<Item value="black" />
<Item value="white" />
<Item value="yellow" />
</Class>
</Classes>
Example 1: Sample Code Illustrating Child Elements, Attributes, and Values in the <Classes> Element
<Groups>
The only child element to <Groups> is <Group>. The <Groups> element defines items that can be used to group properties available in the Style Designer. Users can create groups and apply the group element tag in the appropriate location in the <Settings> and <RuleTraitsSet> elements of the Format Trait Info (.fti) file. This will assemble all <Settings> with a similar group together in the appropriate section of the GUI.
<Settings>
The only child element of the <Settings> element is <Setting>. The <Setting> element defines the parameters for the GUI’s Target Settings dialog. A user may customize the target settings by making changes in this portion of the Format Trait Info (.fti) file.
<RuleTraitsSet>
The only child element of the <RuleTraitsSet> element is <Options>. <Options> contains the child element <option>. See Example 2 for sample code.
The <option> element defines the parameters for the GUI’s Properties and Options Tabs in the Style Designer. A user may customize the Style Designer by making changes in this portion of the Format Trait Info (.fti) file.
<RuleTraitsSet>
<RuleTraits category="Graphic">
<Options>
<Option name="file-extension" group="options" default=".jpg">
<OptionClass name="file-extension" />
</Option>
<Option name="format" group="options" default="jpeg">
<OptionClass name="image-format" />
</Option>
<Option name="color-depth" group="options" default="24">
<OptionClass name="color-depth" />
</Option>
</Options>
</RuleTraits>
</RuleTraitsSet>
Example 2: Sample Code Illustrating Child Elements, Attributes, and Values in the <RuleTraitsSet> Element
Was this helpful?
Last modified date: 08/16/2017