Rational Developer for System z

Adding a Color descriptor

A Color descriptor is evaluated as true if the foreground and background colors specified in the descriptor match the foreground and background colors of the character at the specified offset in the currently displayed application screen.
To create a Color descriptor:
  1. Right-click the screen description to which you want to add the descriptor.
  2. Click Add Descriptor > Add Color Descriptor.
    Note: Alternatively, instead of doing steps 1 and 2, you can do the following:
    1. On the Screen Descriptions tab, click the screen description to which you want to add the descriptor.
    2. Click Editor Menu > Add Color Descriptor on the menu bar of the workbench.
  3. The descriptor is created. The Background Color property and the Foreground Color property are initially set to an empty string (signifying a match with any color). The Position property is set to 1.

You can modify the properties displayed in the Properties view:
  1. Select the property that you want to modify.
  2. Type or select the value that you want the property to have.
Tip: If the Properties view is not visible, see Opening or reopening a view.

Also, for the Position property, you can use the marking rectangle displayed in the screen image on the right side of the Screen Descriptors tab:
  1. When you click Add Color Descriptor, the screen message editor displays a dotted green marking rectangle around the character position specified by the Position property.
  2. Drag the marking rectangle so that it marks the character whose foreground and background colors you want to be compared with the colors specified in the descriptor.
  3. To clear the marking rectangle, click once over the screen image.
  4. To make the marking rectangle appear again, click once over the screen image.

Table 1 lists each property and its significance:
Table 1. Color descriptor
Property: Significance:
Background Color The background color of the character at the specified position in the currently displayed application screen.
Foreground Color The foreground color of the character at the specified position in the currently displayed application screen.
Invert Match After the descriptor has been evaluated as true or false with respect to the currently displayed application screen, the value of the Invert Match property is checked:
  • If the Invert Match value is true, then the boolean result obtained by evaluating the descriptor is inverted, changing true to false or false to true.
  • If the Invert Match value is false, then the boolean result is not inverted.
Position The offset within the application screen of the character whose foreground and background colors are to be compared with the colors specified in the descriptor. This offset is calculated from the (Row, Column) position of the character as follows:
Offset = ((Row-1)*RowSize)+Column
For example, assuming that the screen is 25 rows by 80 columns, then the offset of the character at Row 3, Column 1 of the application screen is:
Offset = ((3-1)*80)+1
       = 161

Feedback