| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (5 out of 11)

Item Representation

The visible portion of an item's knowledge is called its representation. An item's representation is determined by the representation style of its class, for example, its icon, text box, workspace, table, chart, and so on. The next two figures, Samples of G2's Item Representation Styles, Part I and Samples of G2's Item Representation Styles, Part IIshow several representation styles for G2 items.


Note: The representation of an item (other than connections) always occupies a rectangular region on the screen, even if the visible portion of the representation is not rectangular.

Samples of G2's Item Representation Styles, Part I


Samples of G2's Item Representation Styles, Part II


Identifying the G2 Color Palette

G2 supports a large set of colors. G2 displays its color palette when you select color on the menus of items. You can assign any supported color to any color attribute of an item, or to any region of the icon of a system-defined or user-defined class.

The G2 color palette provides these colors:

antique white
aquamarine
azure
beige
black
blue
brown
cadet blue
coral
cyan
dark gray
dark slate blue
dim gray
extra light gray
floral white
forest green
gold
goldenrod
gray
green
green yellow
indian red
ivory
khaki
lavender
light blue
light cyan
light goldenrod
light goldenrod yellow
light gray
light pink
light steel blue
light yellow
lime green
linen
magenta
maroon
medium aquamarine
medium blue
medium goldenrod
medium orchid
orange
pale goldenrod
pale green
pale turquoise
pink
plum
powder blue
purple
red
salmon
sienna
sky blue
slate blue
smoke
tan
thistle
turquoise
violet
violet red
wheat
white
yellow

The G2 color palette also includes the metacolors foreground, background, and transparent. Each metacolor assigns a color value for an item's color attribute by referring to a color attribute of another item:

Identifying the Color Attributes of Items

Each representation style has a corresponding set of color attributes. A color attribute is a component of an item's representation that can appear in a distinct color.

Each item representation presents a set of color attributes:

Other item representations do not have settable color attributes.


Note: The icon-color color attribute of an item is distinct from the color regions defined for its icon. For more information about icon color regions, see Composition of an Icon.

The settings of an item's color attributes are part of its knowledge. You can set the color attributes of items interactively or programmatically.

To set a color region of an item interactively:

Actions That Affect Item Appearance

G2 provides the following actions that change an item color or pattern:

To change a color attribute of an item:

To change a color pattern of an item:

For items with an iconic representation, you can programmatically set the icon-color region as well as any other user-defined icon color-region.

To change an icon region of an item:

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (5 out of 11)

Copyright © 1997 Gensym Corporation, Inc.