HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.transform.components
Class InputWithHintsComponent

java.lang.Object
  extended by com.ibm.hats.transform.components.Component
      extended by com.ibm.hats.transform.components.InputComponent
          extended by com.ibm.hats.transform.components.InputWithHintsComponent
All Implemented Interfaces:
IContextDependent, ICustomPropertySupplier

public class InputWithHintsComponent
extends InputComponent

The Input with Hints component is for recognizing input fields (non-protected fields) that have hints (a set of valid values) to the right of the input field on the host screen.

A recognized command line can be rendered by the following widgets:

The recognize() methods of this component return ComponentElement objects of type: The following settings can be configured for this component:

PropertyDescriptionTypeDefault Value
clipInputFieldsIf 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.booleantrue
extractCaptionsIf 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.booleantrue
clipCaptionsIf true, only the caption text in the selected region is rendered. If false, the end no such clipping occurs.booleanfalse
stripCaptionsIf 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.booleantrue
stripAfterDelimitersThe 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:|-|.
stripReplaceWithThe string that must immediately follow the description.String:
trimCaptionsIf true, white space (spaces, tabs, etc) is removed from both ends of the extracted (and stripped) caption.booleantrue
hintsStartThe string of characters which identifies where the set of hints starts. Multiple values can be specified for this setting; separate with the "|" (pipe character).String"(|[|{|<| "
hintsEndThe string of characters which identifies where the set of hint ends. Multiple values can be specified for this setting; separate with the "|" (pipe character).String")|]|}|>| "
hintsSeparatorThe string of characters which separates each hint in the hint set. Multiple values can be specified for this setting; separate with the "|" (pipe character).String",|or"
hintsLeadingTokenTypeSpecifies what each hint is. For example, if the hint set was "A=Apple,O=Orange,G=Grape", you would set this value to "Letter" (or "Letter or Digit") because "A", "O", and "G" are all letters. You would set the delimiter to "=". Valid values: LETTER, DIGIT, EITHERenumEITHER
hintsMaxLeadingTokenLengthSpecifies the maximum length of the leading token. int4
hintsDelimiterThe string of characters which separates the leading token from the hint description. This setting only applies when the leading token type is not "None".String"=|-"
minimumReqHintsThe minimum number of hints that must be found for this input field to be recognized by this component. This setting is useful for avoiding errant recognition.int1


Field Summary
static String CLASS_NAME
           
static Properties defaults
           
static String LEADINGTOKEN_NONE
           
static String PROPERTY_HINTS_DELIMITER
           
static String PROPERTY_HINTS_END
           
static String PROPERTY_HINTS_LEADING_TOKEN_TYPE
           
static String PROPERTY_HINTS_MAX_LEADING_TOKEN_LENGTH
           
static String PROPERTY_HINTS_SEPARATOR
           
static String PROPERTY_HINTS_START
           
static String PROPERTY_MINIMUM_REQ_HINTS
           
protected  boolean rtlScreen
           
 
Fields inherited from class com.ibm.hats.transform.components.InputComponent
BIDIInputFieldwithHints, PROPERTY_CLIP_CAPTIONS, PROPERTY_CLIP_INPUT_FIELDS, PROPERTY_EXTRACT_CAPTIONS, PROPERTY_STRIP_AFTER_DELIMITERS, PROPERTY_STRIP_CAPTIONS, PROPERTY_STRIP_REPLACE_WITH, PROPERTY_TRIM_CAPTIONS, 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
InputWithHintsComponent(HsrScreen hostScreen)
           
 
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.
 ComponentElementList getHints(int inputFieldStart, int inputFieldLength, BlockScreenRegion ropedRegion, String hintsStart, String hintsEnd, String hintsSeparators, String hintsLeadingTokenType, String hintsMaxLeadingTokenLength, String hintsDelimiters)
          Returns a list of ListItemComponentElement objects, each representing a recognized hint.
 int getPropertyPageCount()
          Returns the number of property pages associated with this object.
 ComponentElement[] recognize(BlockScreenRegion region, Properties settings)
          Returns an array of InputComponentElement objects, each representing an input field which has hints associated with it.
 
Methods inherited from class com.ibm.hats.transform.components.InputComponent
getFieldCaption, isAllowed, isPropertyAllowed, recognize
 
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

CLASS_NAME

public static final String CLASS_NAME
See Also:
Constant Field Values

PROPERTY_HINTS_START

public static final String PROPERTY_HINTS_START
See Also:
Constant Field Values

PROPERTY_HINTS_END

public static final String PROPERTY_HINTS_END
See Also:
Constant Field Values

PROPERTY_HINTS_SEPARATOR

public static final String PROPERTY_HINTS_SEPARATOR
See Also:
Constant Field Values

PROPERTY_HINTS_LEADING_TOKEN_TYPE

public static final String PROPERTY_HINTS_LEADING_TOKEN_TYPE
See Also:
Constant Field Values

PROPERTY_HINTS_MAX_LEADING_TOKEN_LENGTH

public static final String PROPERTY_HINTS_MAX_LEADING_TOKEN_LENGTH
See Also:
Constant Field Values

PROPERTY_HINTS_DELIMITER

public static final String PROPERTY_HINTS_DELIMITER
See Also:
Constant Field Values

PROPERTY_MINIMUM_REQ_HINTS

public static final String PROPERTY_MINIMUM_REQ_HINTS
See Also:
Constant Field Values

LEADINGTOKEN_NONE

public static final String LEADINGTOKEN_NONE
See Also:
Constant Field Values

rtlScreen

protected boolean rtlScreen

defaults

public static Properties defaults
Constructor Detail

InputWithHintsComponent

public InputWithHintsComponent(HsrScreen hostScreen)
Method Detail

recognize

public ComponentElement[] recognize(BlockScreenRegion region,
                                    Properties settings)
Returns an array of InputComponentElement objects, each representing an input field which has hints associated with it.

Overrides:
recognize in class InputComponent
Parameters:
region - rectangular region to search in
settings - recognition settings (see the table above)
Returns:
An array of InputComponentElement objects.
See Also:
Component.recognize(BlockScreenRegion, Properties)

getHints

public ComponentElementList getHints(int inputFieldStart,
                                     int inputFieldLength,
                                     BlockScreenRegion ropedRegion,
                                     String hintsStart,
                                     String hintsEnd,
                                     String hintsSeparators,
                                     String hintsLeadingTokenType,
                                     String hintsMaxLeadingTokenLength,
                                     String hintsDelimiters)
Returns a list of ListItemComponentElement objects, each representing a recognized hint.

Parameters:
inputFieldStart - The linear, 1-based start position of the input field.
inputFieldLength - The length (size) of the input field.
ropedRegion - The region selected for the component
hintsStart - (see settings table above)
hintsEnd - (see settings table above)
hintsSeparators - (see settings table above)
hintsLeadingTokenType - (see settings table above)
hintsMaxLeadingTokenLength - (see settings table above)
hintsDelimiters -
Returns:
A list of ListItemComponentElement objects, each representing a recognized hint.

getPropertyPageCount

public int getPropertyPageCount()
Description copied from interface: ICustomPropertySupplier
Returns the number of property pages associated with this object.

Note: Currently only 0 or 1 pages are supported.

Specified by:
getPropertyPageCount in interface ICustomPropertySupplier
Overrides:
getPropertyPageCount in class InputComponent
Returns:
the number of defined property pages used to configure this object, or 0 if there are none

getCustomProperties

public Vector getCustomProperties(int iPageNumber,
                                  Properties properties,
                                  ResourceBundle bundle)
Description copied from interface: ICustomPropertySupplier
Returns a list of this object's custom properties. Items must be of type com.ibm.hats.common.HCustomProperty.

Specified by:
getCustomProperties in interface ICustomPropertySupplier
Overrides:
getCustomProperties in class InputComponent
Parameters:
iPageNumber - page number containing desired properties
properties - existing values for properties defined here
bundle - ResourceBundle containing NLS descriptions for the properties
Returns:
Vector containing all the custom properties for this object, or null if there are none
See Also:
HCustomProperty

getDefaultValues

public Properties getDefaultValues(int iPageNumber)
Description copied from interface: ICustomPropertySupplier
Returns this object's default property values.

Specified by:
getDefaultValues in interface ICustomPropertySupplier
Overrides:
getDefaultValues in class InputComponent
Parameters:
iPageNumber - page for which to retrieve default properties
Returns:
object's default properties

HATS 7.5.1 (201005110649)