Skip navigation links
ApplinX 10.11.0.0 API Specification

Package com.sabratec.applinx.presentation

This package and it's sub packages are responsible for creating a tag representation output from a host screen.

See: Description

Package com.sabratec.applinx.presentation Description

This package and it's sub packages are responsible for creating a tag representation output from a host screen. The tag representation output is used for creating Instant HTML pages from a host screen.

The following API enables registering as many transformation classes as you require. These transformations can manipulate the output by adding, removing, replacing and changing the screen tag model using a rich library of tags and an easy-to-use API.

The tags are are rendered in absolute terms, as oppose to the relative rendering used previously. Rendering the HTML tags relatively caused indentation problems when trying to add or change elements or style sheets such as GUI elements, host windows and different fonts. In the following API, each tag is rendered with corresponding top/left attributes which places the tag in an exact position. The main advantage of this approach is that changing/adding tags/stylesheets doesn't affect the neighboring tags of the modified tag.

The Main entities used in the API:

Base Object Entities:

Host screen (com.sabratec.applinx.baseobject.GXIScreen)

The host screen entity (which is part of the base object API) is the data model that represents the host screen. The host screen is a collection of fields and additional screen data. The host screen is used in transformations as an event parameter. The host screen event parameter can be used for querying the host screen as to its field contents and properties. (Refer to BaseObject JavaDoc for further documentation).

Host field (com.sabratec.applinx.baseobject.GXIField)

The host field entity (which is part of the base object API) contains various ApplinX and/or host properties such as content, protected/unprotected, color, intensified, ApplinX application field name, etc. The host field is also a tag property for tags that are screen based. (Refer to BaseObject JavaDoc for further documentation).

General Entities:

Position (com.sabratec.util.GXPosition)

This class represents a position on the host screen. It is used by the host field and the tag to indicate a specific position on the host screen.

Rectangle (com.sabratec.util.GXRectangle)

This class represents a rectangle area of positions on the screen. This class is used to determine the screen area of the tags output in the Renderer configuration, and can perform area queries, on a specific area.

Instant API Entities:

Renderer

This entity is represented as an instant tag in the JSP/Instant control in .NET (in instant.jsp/aspx). The Renderer tag renders the HTML output based on the current host screen Renderer configuration settings and registered transformations.

Renderer Configuration (com.sabratec.applinx.presentation.GXRenderConfig)

The Renderer Configuration class contains various configurations such as screen area, font size and sub configurations for various built-in transformations. Examples for such sub configurations include host keys, GUI elements, tables, windows, etc. Each sub configuration also allows disabling specific built-in transformations. The Renderer configuration provides transformation registration of the tag listener and completion listener.

Screen tag model (com.sabratec.applinx.presentation.tags.GXIScreenTagModel)

The screen tag model is the model which contains a list of tags. The model provides various methods for adding, removing, replacing and searching tags. The final tag list in the screen tag model (after all transformations have been completed) will be rendered to the HTML output by the Renderer entity.

Tag (com.sabratec.applinx.presentation.tags.GXITag)

The tag entity is the root class of all tag types, such as text fields, labels, links, combo boxes etc. The tag is a host oriented entity.

The tag provides a reference to the host field, and allows locating tags by setting their position in host units (row, column). The initial position is derived from the host field, and can be modified by the developer. The position will be rendered to HTML units as top/left.

Each tag type contains methods relevant to its type. Special HTML tags are also available such as GXHtmlGenericTag – for creating a generic tag by specifying the tag name and GXHtmlString – for using direct strings and adding them to the screen tag model.

Tags factory (com.sabratec.applinx.presentation.tags.html.GXHtmlTagFactory)

The tags factory is used for creating new HTML tags and for improving performance.

Syntax: GXHtmlTagFactory.instance().newLink(…)

This class contains methods for each type of tag.

Transformations

Transformations are listeners which are registered to the Renderer configuration by the developer, and allow modifying the screen tag model before it is rendered. The transformations can be one of the following types: Tag listeners or Completion listeners.

Note: All ApplinX special entities such as host keys, tables, GUI elements and windows are also represented as built-in transformations, and are performed automatically by the Renderer entity.

Tag listener(com.sabratec.applinx.presentation.event.GXTagListener)

When inheriting from this class, you will receive an event on the creation of each type of tag such as: onNewTextField", "onNewLabel", "onNewButton", etc. It should be used for tag level manipulations, such as changing the content and attributes, adding icons, etc.

Completion listener(com.sabratec.applinx.presentation.event.GXICompletionListener)

When implementing this class you will receive an onComplete event, which should be used for manipulating the entire tag model.

Render Event (com.sabratec.applinx.presentation.event.GXRenderEvent)

An event is thrown by the Renderer to registered transformations when either a new tag is created (tag listener) or the screen tag model has completed its creation process (completion listener). The thrown event passes the Render event as a parameter. The Render event contains the host screen and the screen tag model. Use the screen tag model for manipulating the HTML output by modifying its contained tags.

Query (com.sabratec.applinx.presentation.queries.GXITagQuery)

Used for performing queries on the screen tag model. Each query retrieves a list of the tags that meet the query criteria. The instant API contains a few built-in queries such as a text query and area query. In addition, you can write your own queries by implementing the GXITagQuery interface.
Skip navigation links
ApplinX API Specification

Copyright 2021 Software AG. All rights reserved. Use is subject to license terms.