|
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.TextComponent
public class TextComponent
The Text component is used for extracting visible text from a specified region of the specified host screen.
Recognized text can be rendered by the following widgets:
recognize() methods of this component return ComponentElement objects of type:
| Property | Description | Type | Default Value |
|---|---|---|---|
| preserveLineBreaks | If true, multiple selected rows will be rendered as multiple rows on the resulting Web page. If false, the text from each row will be concatenated together into a single string. | boolean | true |
| Field Summary | |
|---|---|
static String |
CLASS_NAME
|
static Properties |
defaults
Properties object of default settings for this component class |
static String |
PROPERTY_PRESERVE_LINE_BREAKS
Setting name for preserving line breaks |
| 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 | |
|---|---|
TextComponent(HsrScreen hostScreen)
Constructs a new TextComponent 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. |
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 TextComponentElement objects representing all visible text in the specified region |
ComponentElement[] |
recognize(com.ibm.hats.transform.regions.LinearScreenRegion region,
Properties settings)
Not currently 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_PRESERVE_LINE_BREAKS
public static Properties defaults
| Constructor Detail |
|---|
public TextComponent(HsrScreen hostScreen)
TextComponent object.
hostScreen - | Method Detail |
|---|
public ComponentElement[] recognize(BlockScreenRegion region,
Properties settings)
TextComponentElement objects representing all visible text in the specified region
recognize in class Componentregion - screen region to extract fromsettings - (see table above)
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 | ||||||||