|
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.InputComponent
public class InputComponent
The Input component is for recognizing input fields (non-protected fields). This component, besides recognizing input fields, can also extract the field's accompanying caption. To find the field's caption, this component looks for protected text directly preceding the input field (on the same row) first. If the algorithm cannot find a caption, it will look directly above the field for protected text.
A recognized command line can be rendered by the following widgets:
recognize() methods of this component return ComponentElement objects of type:
| Property | Description | Type | Default Value |
|---|---|---|---|
| clipInputFields | If true, only the part of the input field inside of the selected region is recognized and rendered. If false, if any part of an input field is inside the selected region, the entire input field is recognized and rendered. This setting is useful if you need to break a large host screen input field into multiple, smaller Web page input fields. | boolean | true |
| extractCaptions | If true, a caption for the recognized input field is extracted (see the description above for more information on this algorithm). This extracted caption can be used by the widget. | boolean | true |
| clipCaptions | If true, only the caption text in the selected region is rendered. If false, the end no such clipping occurs. | boolean | false |
| stripCaptions | If true, the end of the caption is stripped after (and including) the first occurrence of any value specified in the ?Strip after? setting. This setting is useful for cleaning up extracted captions. | boolean | true |
| stripAfterDelimiters | The string (or set of strings) that is used to strip the extracted caption. For example, if the extracted caption is ?Command ==>? and the value for this setting is ?=?, everything after (and including) the first ?=? is stripped off. | String | :|-|. |
| stripReplaceWith | The string that must immediately follow the description. | String | : |
| trimCaptions | If true, white space (spaces, tabs, etc) is removed from both ends of the extracted (and stripped) caption. | boolean | true |
| Field Summary | |
|---|---|
protected boolean |
BIDIInputFieldwithHints
|
static String |
CLASS_NAME
|
static Properties |
defaults
Properties object that contains the default values for each setting of this component. |
static String |
PROPERTY_CLIP_CAPTIONS
clipCaptions (see properties table above) |
static String |
PROPERTY_CLIP_INPUT_FIELDS
clipInputFields (see properties table above) |
static String |
PROPERTY_EXTRACT_CAPTIONS
extractCaptions (see properties table above) |
static String |
PROPERTY_STRIP_AFTER_DELIMITERS
stripAfterDelimiters (see properties table above) |
static String |
PROPERTY_STRIP_CAPTIONS
stripCaptions (see properties table above) |
static String |
PROPERTY_STRIP_REPLACE_WITH
stripReplaceWith (see properties table above) |
static String |
PROPERTY_TRIM_CAPTIONS
trimCaptions (see properties table above) |
protected boolean |
reverseComponent
|
| 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 | |
|---|---|
InputComponent(HsrScreen hostScreen)
Constructs a new InputComponent object. |
|
| Method Summary | |
|---|---|
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,
BlockScreenRegion selectedRegion,
boolean strip,
String[] stripAfterDelimiters,
String stripReplaceWith,
boolean trim)
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 input field (or partial input field) that was found in the specified region. |
ComponentElement[] |
recognize(com.ibm.hats.transform.regions.LinearScreenRegion region,
Properties settings)
Not implemented yet. |
| 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_CLIP_CAPTIONS
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 Properties defaults
Properties object that contains the default values for each setting of this component.
protected boolean reverseComponent
protected boolean BIDIInputFieldwithHints
| Constructor Detail |
|---|
public InputComponent(HsrScreen hostScreen)
InputComponent object.
hostScreen - | Method Detail |
|---|
public ComponentElement[] recognize(BlockScreenRegion region,
Properties settings)
InputComponentElement objects representing each input field (or partial input field) that was found in the specified region.
recognize in class Componentregion - rectangular region to search insettings - recognition settings (see the table above)
InputComponentElement objects.Component.recognize(BlockScreenRegion, Properties)
public ComponentElement[] recognize(com.ibm.hats.transform.regions.LinearScreenRegion region,
Properties settings)
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,
BlockScreenRegion selectedRegion,
boolean strip,
String[] stripAfterDelimiters,
String stripReplaceWith,
boolean trim)
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.selectedRegion - A BlockScreenRegion to clip caption, or null if not clipping to selectedRegion.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.trim - If true, trims (removes whitespace) from both ends of the string.
String caption for the input field at the specified fieldStartPos.
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 | ||||||||