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 CommandLineComponent

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.CommandLineComponent
All Implemented Interfaces:
IContextDependent, ICustomPropertySupplier

public class CommandLineComponent
extends InputComponent

The Command Line component is responsible for recognizing input fields which have a specific string of characters (the token) preceding the input field.

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
tokenThe string of characters which must precede the input field.String==>
extractCaptionsIf true, a caption for the recognized input field is extracted (see the description for com.ibm.hats.transform.components.InputComponent for more information). This extracted caption can be used by the widget.booleantrue
trimCaptionsIf true, white space (spaces, tabs, etc) is removed from both ends of the extracted (and stripped) caption.booleantrue
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


Field Summary
static String CLASS_NAME
           
static Properties defaults
           
protected  boolean isrtlcomponent
           
protected  boolean isrtldisplay
           
protected  boolean isrtltext
           
static String PROPERTY_TOKEN
           
 
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
CommandLineComponent(HsrScreen hostScreen)
          Constructs a new component 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.
 int getPropertyPageCount()
          Returns the number of property pages associated with this object.
 ComponentElement[] recognize(BlockScreenRegion region, Properties settings)
          Returns an array of InputComponentElement objects representing each command line found in the specified region using the specified settings.
 void swapBuffer(char[] buffer)
           
 
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_TOKEN

public static final String PROPERTY_TOKEN
See Also:
Constant Field Values

defaults

public static Properties defaults

isrtldisplay

protected boolean isrtldisplay

isrtltext

protected boolean isrtltext

isrtlcomponent

protected boolean isrtlcomponent
Constructor Detail

CommandLineComponent

public CommandLineComponent(HsrScreen hostScreen)
Constructs a new component object. Command lines will be searched for in the specified host screen argument.

Parameters:
hostScreen - Screen to search for command lines in.
Method Detail

recognize

public ComponentElement[] recognize(BlockScreenRegion region,
                                    Properties settings)
Returns an array of InputComponentElement objects representing each command line found in the specified region using the specified settings.

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)

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

swapBuffer

public void swapBuffer(char[] buffer)

HATS 7.5.1 (201005110649)