|
HATS 7.5.1 Web API ReferencePublicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.hats.transform.components.Component
com.ibm.hats.transform.components.SelectionListComponent
public class SelectionListComponent
The Selection List component is responsible for recognizing selection lists (aka menus) in a specified region of a host screen.
A recognized selection list can be rendered by the following widgets:
recognize() methods of this component return ComponentElement objects of type:
| Property | Description | Type | Default Value |
|---|---|---|---|
| reqValueBeforeLeadingToken | The string which precedes the leading token of each list item. | String | (two spaces) |
| leadingTokenType | Specifies whether each list item starts with letters, digits, or both letters and digits. | enum | EITHER |
| maxLeadingTokenLength | Specifies the maximum length of the leading token (used to help restrict what gets recognized as a list item). | int | 4 |
| delimiter | The string of characters between the leading token and the description. You can specify more than one value, separated by the "|" (vertical bar) character. | String | ". |- " (period space OR dash space) |
| stringAfterCaption | The string of characters which must follow each list item | String | (two spaces) |
| minimumReqOptions | The minimum number of list items that must be found in order for the selected region to be recognized as a selection list. | int | 2 |
| target | Specifies which input field receives the selection. Options: FIRST, LAST, PREVIOUS, NEXT, SPECIFIED, CURSOR. | enum | NEXT |
| targetFieldRow | Specifies the row of the input field which should receive the selection. Note: This setting only applies if "SPECIFIED" is selected as the selection target. | int | -1 |
| targetFieldCol | Specifies the column of the input field which should receive the selection. Note: This setting only applies if "SPECIFIED" is selected as the selection target. | int | -1 |
| actionKey | Specifies the host aid key that should be pressed after the target input field has been updated with the end user's selection. The default value is "[enter]" meaning that the enter key will be pressed once the user makes a selection. | String | [enter] |
| sortSelections | If true, list items are sorted according to either their leading token or description (see below for more information on other settings). | boolean | false |
| sortBy | Specifies whether to sort the set of list options by their leading token or description. Valid values: ITEM or DESCRIPTION | enum | ITEM |
| sortOrder | Specifies whether to sort the set of list options in ascending or descending order. Note: The locale-sensitive sorting methods, built into Java, are used to perform this operation. Valid values: ASCENDING or DESCENDING | enum | ASCENDING |
| convertActionNumber | If your host displays full-width characters for the list items' leading token, but it expects the item to be entered into the target input field as single-byte characters, then this parameter must be enabled. This will convert the DBCS item into a SBCS item before it is sent to the host. This setting does not apply for items which are displayed as single-byte characters on the host. | boolean | true |
| placeholders | Specifies whether to embed placeholder list items when gaps (i.e. empty space) exist between list items. Valid values: NONE, SINGLE, or ACTUAL. | enum | ACTUAL |
| maxSpaceAfterDelimiter | Specifies the maximum number of space characters between the end of the delimiter and the start of the caption | int | 5 |
Example
In the following example, "1" is the leading token, ". " is the delimiter, "User tasks" is the caption, and " " (two spaces) is the end delimiter:
1. User tasks
SelectionComponentElement| Nested Class Summary | |
|---|---|
static class |
SelectionListComponent.GroupingHint
Internal class used to help group related list items together. |
| Fields inherited from class com.ibm.hats.transform.components.Component |
|---|
contextAttributes, flag, hostScreen |
| Fields inherited from interface com.ibm.hats.common.ICustomPropertySupplier |
|---|
CLASSNAME |
| Constructor Summary | |
|---|---|
SelectionListComponent(HsrScreen hostScreen)
Constructs a new SelectionListComponent object. |
|
| Method Summary | |
|---|---|
protected SelectionComponentElement |
addPlaceholders(SelectionComponentElement sce,
Hashtable groupingHints,
String type)
Method which adds empty placeholder list items to the selection list set. |
protected int |
calculateTargetField(int target,
int listItemStartPos,
int targetRow,
int targetCol)
|
Vector |
getCustomProperties(int iPageNumber,
Properties properties,
ResourceBundle bundle)
Returns a list of this object's custom properties. |
Properties |
getDefaultValues(int iPageNumber)
Returns this object's default property values. |
boolean |
getIsSubfileWidget()
|
int |
getPropertyPageCount()
Returns the number of property pages associated with this object. |
String[] |
getValueBefore(Properties settings)
Deprecated. Internal use only. |
protected SelectionComponentElement[] |
groupListItems(ComponentElementList cel,
Hashtable groupingHints,
int minReqOptions,
boolean inDefaultRendering)
This method takes a ComponentElementList (of ListItemComponentElement objects) and groups them into
separate, logical selection lists (used for Default Rendering). |
protected SelectionComponentElement[] |
groupListItems(ComponentElementList cel,
Hashtable groupingHints,
int minReqOptions,
boolean inDefaultRendering,
boolean groupIndividually,
boolean isRecognizedOpposite)
This method takes a ComponentElementList (of ListItemComponentElement objects) and groups them into
separate, logical selection lists (used for Default Rendering). |
boolean |
isAllowed(ContextAttributes contextAttributes)
Gets whether or not this object should be visible in the studio given some context attributes. |
boolean |
isPropertyAllowed(String name,
ContextAttributes contextAttributes)
Gets whether or not the specified property should be visible in the component or widget settings. |
ComponentElement[] |
recognize(BlockScreenRegion region,
Properties settings)
Returns an array of SelectionComponentElement objects representing each selection list found in the specified region of the screen. |
ComponentElement[] |
recognize(com.ibm.hats.transform.regions.LinearScreenRegion region,
Properties settings)
Currently not implemented. |
void |
setIsSubfileWidget(boolean isSubfile)
|
| Methods inherited from class com.ibm.hats.transform.components.Component |
|---|
convertPosToCol, convertPosToRow, convertRowColToPos, findFirstDelimiterIndex, findFirstIndexOf, findFirstIndexOf, findFirstIndexOf, findFirstNonWhitespaceIndex, findFirstNonWhitespaceIndex, findFirstNonWhitespaceIndex, getContextAttribute, getContextAttributes, getCustomComposite, getHostScreen, getTrailingSpaceCount, newInstance, recognize, setContextAttribute, setContextAttributes, setHostScreen |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CLASS_NAME
public static final String PROPERTY_VALUE_BEFORE_LEADING_TOKEN
public static final String PROPERTY_LEADING_TOKEN_TYPE
public static final String PROPERTY_MAX_LEADING_TOKEN_LENGTH
public static final String PROPERTY_DELIMITER
public static final String PROPERTY_END_DELIMITER
public static final String PROPERTY_MINIMUM_REQ_OPTIONS
public static final String PROPERTY_SORT_SELECTIONS
public static final String PROPERTY_SORT_BY
public static final String PROPERTY_SORT_ORDER
public static final String PROPERTY_OPTIONS_TO_EXCLUDE
public static final String PROPERTY_CONVERT_ACTION_NUMBER
public static final String PROPERTY_PLACEHOLDERS
public static final String PROPERTY_MAX_SPACE_AFTER_DELIMITER
public static final String PROPERTY_IGNORE_TARGET_INPUT_FIELD
public static final String PROPERTY_TARGET
public static final String PROPERTY_TARGET_ROW
public static final String PROPERTY_TARGET_COL
public static final String PROPERTY_ACTION_KEY
public static final String PROPERTY_USE_ACTION
public static final String TARGET_FIRST_ON_SCREEN
public static final String TARGET_LAST_ON_SCREEN
public static final String TARGET_PREVIOUS
public static final String TARGET_NEXT
public static final String TARGET_FIELD
public static final String TARGET_CURSOR_POSITION
public static final String TARGET_CLOSEST
public static final int INT_TARGET_FIRST_ON_SCREEN
public static final int INT_TARGET_LAST_ON_SCREEN
public static final int INT_TARGET_PREVIOUS
public static final int INT_TARGET_NEXT
public static final int INT_TARGET_FIELD
public static final int INT_TARGET_CURSOR_POSITION
public static final int INT_TARGET_CLOSEST
public static final String LEADINGTOKEN_DIGIT
public static final String LEADINGTOKEN_LETTER
public static final String LEADINGTOKEN_EITHER
public static final String SORT_BY_ITEM
public static final String SORT_BY_DESCRIPTION
public static final String SORT_ORDER_ASCENDING
public static final String SORT_ORDER_DESCENDING
public static final String PLACEHOLDER_NONE
public static final String PLACEHOLDER_SINGLE
public static final String PLACEHOLDER_ACTUAL
public static final String PROPERTY_GROUP_INDIVIDUALLY
public static Properties defaults
| Constructor Detail |
|---|
public SelectionListComponent(HsrScreen hostScreen)
SelectionListComponent object.
| Method Detail |
|---|
public void setIsSubfileWidget(boolean isSubfile)
public boolean getIsSubfileWidget()
public String[] getValueBefore(Properties settings)
settings - The Properties settings.
public ComponentElement[] recognize(BlockScreenRegion region,
Properties settings)
SelectionComponentElement objects representing each selection list found in the specified region of the screen.
recognize in class Componentregion - BlockScreenRegion to search insettings - recognition settings
Component.recognize(BlockScreenRegion, Properties),
SelectionComponentElement
protected int calculateTargetField(int target,
int listItemStartPos,
int targetRow,
int targetCol)
target - (see the list of static fields in this class beginning with "INT_TARGET..." above)listItemStartPos - linear, 1-based start position of the first item in the listtargetRow - 1-based target row number (only applicable if target == SPECIFIED)targetCol - 1-based target column number (only applicable if target == SPECIFIED)
protected SelectionComponentElement[] groupListItems(ComponentElementList cel,
Hashtable groupingHints,
int minReqOptions,
boolean inDefaultRendering)
ListItemComponentElement objects) and groups them into
separate, logical selection lists (used for Default Rendering).
In the groupingHints Hashtable, for each item, the key will be a ListItemComponentElement object and the value will be a GroupingHint object.
cel - list of ListItemComponentElement objectsgroupingHints - table of "grouping hint" objects.minReqOptions - minimum number of options that must be bound to the same target input field.
SelectionComponentElement objects, each representing a set of related list items.
protected SelectionComponentElement[] groupListItems(ComponentElementList cel,
Hashtable groupingHints,
int minReqOptions,
boolean inDefaultRendering,
boolean groupIndividually,
boolean isRecognizedOpposite)
ListItemComponentElement objects) and groups them into
separate, logical selection lists (used for Default Rendering).
In the groupingHints Hashtable, for each item, the key will be a ListItemComponentElement object and the value will be a GroupingHint object.
cel - list of ListItemComponentElement objectsgroupingHints - table of "grouping hint" objects.minReqOptions - minimum number of options that must be bound to the same target input field.groupIndividually - group list items in their own group (after confirming they belong to a group)
SelectionComponentElement objects, each representing a set of related list items.
protected SelectionComponentElement addPlaceholders(SelectionComponentElement sce,
Hashtable groupingHints,
String type)
sce - list to add placeholders togroupingHints - table of grouping hints (used to determine space between list items)type - PLACEHOLDERS setting ("NONE", "SINGLE", or "ACTUAL")
PlaceholderListItemComponentElement,
SelectionListComponent.GroupingHint
public ComponentElement[] recognize(com.ibm.hats.transform.regions.LinearScreenRegion region,
Properties settings)
recognize in class Componentpublic int getPropertyPageCount()
ICustomPropertySupplierNote: Currently only 0 or 1 pages are supported.
getPropertyPageCount in interface ICustomPropertySuppliergetPropertyPageCount in class Component
public Vector getCustomProperties(int iPageNumber,
Properties properties,
ResourceBundle bundle)
ICustomPropertySuppliercom.ibm.hats.common.HCustomProperty.
getCustomProperties in interface ICustomPropertySuppliergetCustomProperties in class ComponentiPageNumber - page number containing desired propertiesproperties - existing values for properties defined herebundle - ResourceBundle containing NLS descriptions for the properties
HCustomPropertypublic Properties getDefaultValues(int iPageNumber)
ICustomPropertySupplier
getDefaultValues in interface ICustomPropertySuppliergetDefaultValues in class ComponentiPageNumber - page for which to retrieve default properties
public boolean isAllowed(ContextAttributes contextAttributes)
IContextDependent
isAllowed in interface IContextDependent
public boolean isPropertyAllowed(String name,
ContextAttributes contextAttributes)
IContextDependent
isPropertyAllowed in interface IContextDependentname - property name
|
HATS 7.5.1 (201005110649) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||