Extending : Processor editor extension : Extending the Processor editor : Creating a configuration file for a palette object : State objects
  
State objects
There are three tags in the configuration file of state objects:
<appearance> tag
<properties> tag
<property> tag
An example of a configuration file for a state object is provided here:
<?xml version="1.0" encoding="UTF-8"?>
<state xmlns="http://btt.ibm.com/StateSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://btt.ibm.com/StateSchema StateSchema.xsd ">
<appearance backgroundColor="254,46,154" font="Arial-italic-20" fontColor="0,0,0" gradient="true"/>
<properties>
<property name="Page" displayName="Page Name" defaultValue="" hidden="false" required="true"
description="Page file path" editRule="PageSelection" />
<property name="Back Allowed" defaultValue="False" hidden="false" required="false"
description="Specifies the possibility to use the back button from the navigator" editRule="Boolean" />
<property name="id" defaultValue="" hidden="true" required="false" description="id" editRule="" />
</properties>
</state>
Attributes of the <appearance> tag of a state object
The <appearance> tag defines how a state object is displayed in the Palette view in Rational Application Developer.
gradient
true or false
fontColor
Color in RGB. For example, 255,255,255
backgroundColor
Color in RGB. For example, 255,255,255
font
The font of the text that is displayed on a state object.
Attributes of the <property> tag
The <properties> tag lists the properties of a state object. The <properties> tag must contain one or more <property> tags.
The <property> tag describes how a state object is displayed in the editing area of the Processor Editor and how a property of the state object can be edited.
name
The property name identifier.
defaultValue
It corresponds to the property value by default.
hidden
Specifies whether the property is displayed. Possible values are true or false. If it is set to true, the attributes described are not displayed. The default value is false.
editRule
It is the property editor that will be used by the user to enter the property value. It should be the same as any rule id in the predefined property edit rules. If it is not specified, a default editor is assigned.
description
Contains the text to be used as tooltip.
required
Specifies whether the property is mandatory. If the property is mandatory, then a value must be specified for the property. Possible values are true or false. The default value is false.
The predefined property edit rules
 
Rule ID
Description
Boolean
For boolean chosen rule
XValidate
For XValidate property editor rule
Context
For Context chosen rule
ConditionAdjust
For Condition adjust rule
OpStepAction
For OpStep action chosen rule
OpStepCondition
For OpStep condition rule
Operation
For Operation chosen rule
EventId
For Event Id chosen rule
PageSelection
For Page chosen rule
Go up to
Creating a configuration file for a palette object