Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 4 Adding Additional Features to a Screen : Color Implementation

Color Implementation
Adding Color
You can specify background and foreground colors for screen fields and literal text when painting a screen table. You can type the name of the color directly into the field or a prompt screen appears with a list of valid colors.
Two TIBCO Object Service Broker tables and a shareable tool are used to implement the use of color in the Screen Definer. The tables @COLOURS and @SCREENCOLOURS are explained below.
Purpose of the @COLOURS Table
The @COLOURS table contains a listing of all the colors supported by TIBCO Object Service Broker, independent of the display device. Each color has a corresponding code that uniquely identifies it and a corresponding default code that maps to one of the eight base colors supported on most display devices.
Example
The following example illustrates of the @COLOURS table:

 
BROWSING TABLE : @COLOURS
COMMAND ==>
SCROLL: P
NAME CODE DEFAULTCODE COLORNAME
_ ------------------------- ------ ------ --------------------------------
_ ALICEBLUE 17 1 Alice Blue
_ ANTIQUEWHITE 18 7 Antique White
_ AQUAMARINE 19 5 Aqua Marine
_ AZURE 20 8 Azure
_ BEIGE 21 8 Beige
_ BISQUE 22 8 Bisque
_ BLACK 8 8 Black
_ BLANCHEDALMOND 23 8 Blanched Almond
_ BLUE 1 1 Blue
_ BLUEVIOLET 28 1 Blue Violet
_ BLUE1 24 1 Blue 1
_ BLUE2 25 1 Blue 2
_ BLUE3 26 1 Blue 3
_ BLUE4 27 1 Blue 4
_ BROWN 13 2 Brown
_ BROWN1 29 2 Brown 1
_ BROWN2 30 2 Brown 2
PFKEYS: 1=HELP 5=FIND NEXT 9=RECALL 18=EXCLUDE 13=PRINT 3=END 14=EXPAND

 
Fields in the @COLOURS Table
The fields in the @COLOURS table contain the following information:
The default code assigned to each color. If a display device does not support a color, this code maps the unsupported color to one of the eight base colors supported on all devices.
Purpose of the @SCREENCOLOURS Table
The @SCREENCOLOURS table, parameterized by display device, lists the colors supported for a specific device (that is, 3270). The table has a minimum listing of eight colors. It also contains a field indicating which internal device code is substituted for a color that the device does not support.
Example
The following example illustrates the @SCREENCOLOURS table instances for a 3270 display device:

 
BROWSING TABLE : @SCREENCOLOURS(3270)
COMMAND ==>
SCROLL: P
GLOBALCODE DEVICECODE
_ ------ ------
_ 1 1
_ 2 2
_ 3 3
_ 4 4
_ 5 5
_ 6 6
_ 7 7
_ 8 1
 
PFKEYS: 1=HELP 5=FIND NEXT 9=RECALL 18=EXCLUDE 13=PRINT 3=END 14=EXPAND

 
Fields in the @SCREENCOLOURS Table
The fields in the @SCREENCOLOURS table contain the following information:
Color code listing for the global colors supported by the device. Always contains a minimum of eight base colors.
An internal device code used to map each color that is not supported on that device to a color that is supported. In the example, the color with a color code of 8 (BLACK), which is not supported on 3270 terminals, is mapped to the internal device code 1 (BLUE), which is supported.
See Also
The $SETCOLOUR tool in TIBCO Object Service Broker Shareable Tools.

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved