|
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.ItemSelectionComponent
public class ItemSelectionComponent
The Item Selection component is responsible for recognizing item selection lists (aka menus) in a specified region of a host screen.
A recognized item 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
InputComponentElement| Field Summary | |
|---|---|
static String |
CLASS_NAME
|
static Properties |
defaults
|
static String |
PROPERTY_CAPTIONS_LAST
|
static String |
PROPERTY_CLIP_INPUT_FIELDS
|
static String |
PROPERTY_EXTRACT_CAPTIONS
|
static String |
PROPERTY_MUST_HAVE_CAPTION
|
static String |
PROPERTY_STRIP_AFTER_DELIMITERS
|
static String |
PROPERTY_STRIP_CAPTIONS
|
static String |
PROPERTY_STRIP_REPLACE_WITH
|
static String |
PROPERTY_TRIM_CAPTIONS
|
| 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 | |
|---|---|
ItemSelectionComponent(HsrScreen hostScreen)
Constructs a new ItemSelectionComponent object. |
|
| Method Summary | |
|---|---|
protected String |
deshape(String s)
|
static String |
getBlockScreenRegionString(BlockScreenRegion bsr,
HsrScreen hs,
String strbreak)
Gets the rectangle defined in the block screen region as a string. |
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. |
String |
getFieldCaption(int fieldStartPos,
int startCol,
int endCol,
boolean clip,
boolean strip,
String[] stripAfterDelimiters,
String stripReplaceWith,
boolean captionlast,
boolean trim,
BlockScreenRegion region)
Returns a String caption for the input field at the specified fieldStartPos. |
int |
getPropertyPageCount()
Returns the number of property pages associated with this object. |
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 InputComponentElement 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. |
| 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_CLIP_INPUT_FIELDS
public static final String PROPERTY_EXTRACT_CAPTIONS
public static final String PROPERTY_STRIP_CAPTIONS
public static final String PROPERTY_STRIP_AFTER_DELIMITERS
public static final String PROPERTY_STRIP_REPLACE_WITH
public static final String PROPERTY_TRIM_CAPTIONS
public static final String PROPERTY_CAPTIONS_LAST
public static final String PROPERTY_MUST_HAVE_CAPTION
public static Properties defaults
| Constructor Detail |
|---|
public ItemSelectionComponent(HsrScreen hostScreen)
ItemSelectionComponent object.
| Method Detail |
|---|
public ComponentElement[] recognize(BlockScreenRegion region,
Properties settings)
InputComponentElement objects representing each selection list found in the specified region of the screen.
recognize in class Componentregion - rectangular region to search insettings - recognition settings (see the table above)
InputComponentElement objects.Component.recognize(BlockScreenRegion, Properties),
InputComponentElement
public ComponentElement[] recognize(com.ibm.hats.transform.regions.LinearScreenRegion region,
Properties settings)
ComponentThis method must be implemented if the base class is subclassed.
recognize in class ComponentComponent.recognize(LinearScreenRegion, Properties)public int getPropertyPageCount()
ICustomPropertySupplierNote: Currently only 0 or 1 pages are supported.
getPropertyPageCount in interface ICustomPropertySuppliergetPropertyPageCount in class Component
public String getFieldCaption(int fieldStartPos,
int startCol,
int endCol,
boolean clip,
boolean strip,
String[] stripAfterDelimiters,
String stripReplaceWith,
boolean captionlast,
boolean trim,
BlockScreenRegion region)
String caption for the input field at the specified fieldStartPos.
fieldStartPos - Linear (1-based) start position of the input field to find the caption for.startCol - (1-based) start column of the region.endCol - (1-based) end column of the region.clip - If true clip input field.strip - If true, strip the end of the string starting with the first found "stripAfterDelimiter".stripAfterDelimiters - Array of strip after delimiters.stripReplaceWith - String of characters to replace the stripped out characters with.captionlast - If true, caption is located after input field.trim - If true, trims (removes whitespace) from both ends of the string.
String caption for the input field at the specified fieldStartPos.protected String deshape(String s)
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 static String getBlockScreenRegionString(BlockScreenRegion bsr,
HsrScreen hs,
String strbreak)
bsr - The region of the screen to retrieve.hs - The host screen object.strbreak - The row separator string to use.
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 | ||||||||