Style

A style definition defines a set of style elements that can be applied to the Agentry Client’s user interface to affect its appearance. These elements include text and background colors, font face and size, borders, and other similar UI items. A style may be defined for all supported application platforms or for a single platform.

The Agentry Editor allows the developer to create display styles for screens, buttons, text, fields and list controls. A style is defined as a collection of display elements combined to provide an overall look and feel to the application.

Styles exist at the application level in a project. They are then available to be used, or “applied” at the application, module, platform, screen and control levels. Each attribute, or “style element” of a style definition may be set to a specific value or default. Default results in the system default being used for that aspect of the user interface.

If styles are applied at multiple levels within the application they are merged at run time before being applied to the user interface. The style definition applied at a lower level in the application hierarchy will override the settings of a style applied at a higher level. If the lower level style has an element set to default, the setting for that same element in the higher level style definition will be used. This merge then results in the overall appearance of the user interface component to which the style is applied.

A style may defined for a specific platform. Multiple styles may be defined with the same name but with different platform selections. When a style is applied to the user interface, only the name is referenced. At run time, a given client device type will receive only the styles with a matching platform. This is optional behavior and a style may defined for all platforms.

iPhone and iPad/iPod Touch Platform Note

Due to the nature of the iOS devices, the current style support for these device platforms is limited to the specification of the Font Face and the Foreground Color. Styles can only be applied to specific controls and the affects of the two supported style attributes are the font in which text is displayed and the color of that text.

Style Attributes

Following is a list of the attributes for a style definition. In the context of a style definition these attributes are commonly referred to as “style elements” and the terms are interchangeable:

  • Foreground Color: This attribute specifies the color of any text displayed on the user interface component to which the style is applied. If a particular user interface component has no text, the Foreground Color setting will have no affect on its appearance.
  • Background Color: This attribute specifies the color of the background of the user interface component. The background of a screen or control is the area that contains no controls, text, or list items.
  • Font Face: This attribute specifies the font used to display any text on the user interface to which the style is applied. Within the Agentry Editor, the Font Face attribute field contains a drop-down list. Its contents will be any fonts installed on the host system of the Editor. The name of a font may also be manually entered if it is one that is known to be available on the client devices, even if it is not available on the Editor’s host system. Any font face entered manually in the list will be available in this same list for all style definitions within the application. If a font name is entered that is not available on a client device, the behavior will be the same as if Default had been selected for the Font Face attribute.
  • Point Size: This attribute specifies the size of the text displayed to the user. If the point size is larger than the viewable area given to that text value, that viewable area will not be increased in size.
  • Font Style: This attribute specifies whether the text is displayed normally (referred to as the regular font style), or in bold, italics, or bold italics. The Font Style attribute may not have an effect on the appearance of the text based on the selected Font Face. Certain fonts are inherently bold or italicized, or may not support either behavior.
  • Underline: This attribute specifies whether the text is underlined. This attribute may have no effect on certain Font Face selections, as the selected font may not support underline or may be inherently underlined.
  • Border Style: This attribute controls how the border around certain UI components will appear. This includes detail screen fields and buttons. The border style can be None, Flat, or 3-D.
  • Text Alignment - Horizontal Alignment: This attribute specifies the alignment of the text displayed by the UI component to which the style is applied. The options are:
    • “Align Left” - This selection specifies that the text is to be aligned to the left of the viewable area allotted for the text being displayed.
    • “Align Right” - This selection specifies that the text is to be aligned to the right of the viewable area allotted for the text being displayed.
    • “Center” - This selection horizontally centers the text within the viewable area allotted for the text being displayed.
    • “Default” - This selection will horizontally align the text according to the default behavior of the item containing the text.