|
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.FunctionKeyComponent
public class FunctionKeyComponent
The Function Key component is responsible for recognizing function (PF) keys. This component is used to transform static text on the host screen representing a function key into a button or link which your end user can click.
A recognized function key can be rendered by the following widgets:
recognize() methods of this component return ComponentElement objects of type:
| Property | Description | Type | Default Value |
|---|---|---|---|
| reqValueBeforeLeadingToken | Optional. The string that must precede the start delimiter. You can specify more than one value, separated by the ?|? (vertical bar) character. For a function key candidate to be recognized, it must be preceded by this value. | String | (one space) |
| startDelimiter | Required. The string that marks the beginning of the potential function key. You can specify more than one value, separated by the ?|? (vertical bar) character. Any of the values will be recognized as beginning a function key. This value can contains a ?#? (pound sign) ?which will be evaluated as ?a number? during recognition. | String | PF#|F#| #=|# |
| delimiter | Optional. The string that separates the start delimiter from the description. You can specify more than one value, separated by the ?|? (vertical bar) character. | String | =| - |-| = |: |
| reqValueAfterDescription | Optional. The string that must immediately follow the description. | String | | (two spaces OR one space) |
| Field Summary | |
|---|---|
static String |
CLASS_NAME
|
static Properties |
defaults
|
static String |
PROPERTY_DELIMITER
|
static String |
PROPERTY_END_DELIMITER
|
static String |
PROPERTY_SEARCH_ORDER
|
static String |
PROPERTY_SEARCH_ORDER_ALL_ITEMS_FIRST
|
static String |
PROPERTY_SEARCH_ORDER_ENTIRE_KEY
|
static String |
PROPERTY_START_DELIMITER
|
static String |
PROPERTY_VALUE_BEFORE_LEADING_TOKEN
|
| 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 | |
|---|---|
FunctionKeyComponent(HsrScreen hostScreen)
Constructs a new FunctionKeyComponent object. |
|
| Method Summary | |
|---|---|
String[] |
createPossibleKeys(String[] startDelimiters,
Properties settings)
Retuns an array of "expanded" String objects. |
String[] |
expandDelimiters(String[] delimiters,
Properties settings)
Retuns an array of "expanded" String objects. |
List |
findAllFunctionKeysSeparatelyInRow(String line,
int startPos,
String[] valueBeforeStartDelimiters,
String[] startDelimiters,
String[] delimiters,
String[] endDelimiters,
Properties settings)
Deprecated. |
protected static int |
findFirstIndexOfDelimiter(String line,
String[] delimiters)
Return the first index (0-based) of the specified line which is the start of one of the specified delimiters. |
List |
findFunctionKeysInRow(String line,
int startPos,
String[] valueBeforeStartDelimiters,
String[] startDelimiters,
String[] delimiters,
String[] endDelimiters,
Properties settings,
String followString)
Deprecated. |
List |
findFunctionKeysInRow2(String line,
int startPos,
String[] valueBeforeStartDelimiters,
String[] startDelimiters,
String[] delimiters,
String[] endDelimiters,
Properties settings,
String followString)
Deprecated. |
String[] |
getBeforeLeadingToken(Properties settings)
Returns a String array of strings which can preceed the candidate function key. |
Vector |
getCustomProperties(int iPageNumber,
Properties properties,
ResourceBundle bundle)
Returns a list of this object's custom properties. |
int |
getPropertyPageCount()
Returns the number of property pages associated with this object. |
String[] |
getStartDelimiter(Properties settings)
Returns a String array of start delimiters. |
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)
Method to recognize components in the specified BlockScreenRegion using the specified settings. |
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, getDefaultValues, 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_START_DELIMITER
public static final String PROPERTY_DELIMITER
public static final String PROPERTY_VALUE_BEFORE_LEADING_TOKEN
public static final String PROPERTY_END_DELIMITER
public static final String PROPERTY_SEARCH_ORDER
public static final String PROPERTY_SEARCH_ORDER_ENTIRE_KEY
public static final String PROPERTY_SEARCH_ORDER_ALL_ITEMS_FIRST
public static Properties defaults
| Constructor Detail |
|---|
public FunctionKeyComponent(HsrScreen hostScreen)
FunctionKeyComponent object.
hostScreen - HostScreen to look for function keys in.| Method Detail |
|---|
public String[] getStartDelimiter(Properties settings)
String array of start delimiters.
settings - The Properties settings.
String array of start delimiters.public String[] getBeforeLeadingToken(Properties settings)
String array of strings which can preceed the candidate function key.
settings - The Properties settings.
String array of strings which can preceed the candidate function key.
public ComponentElement[] recognize(BlockScreenRegion region,
Properties settings)
ComponentBlockScreenRegion using the specified settings.This method must be implemented if the base class is subclassed.
recognize in class Componentregion - BlockScreenRegion to search insettings - recognition settings
Component.recognize(ScreenRegion, Properties)
public ComponentElement[] recognize(com.ibm.hats.transform.regions.LinearScreenRegion region,
Properties settings)
recognize in class Component
public String[] createPossibleKeys(String[] startDelimiters,
Properties settings)
String objects. Expansion involves converting any # (pound) symbols into a set of delimiters.
startDelimiters - The array of start delimiters.settings - The settings.
String objects. Expansion involves converting any # (pound) symbols into a set of delimiters.
public List findAllFunctionKeysSeparatelyInRow(String line,
int startPos,
String[] valueBeforeStartDelimiters,
String[] startDelimiters,
String[] delimiters,
String[] endDelimiters,
Properties settings)
java.util.List containing FunctionKeyComponentElement objects, each respresenting a function key found in the specified line.
line - String to look for function keys in.startPos - the (1-based) linear start position of the first character of the line. This is used to set the consumed region for each function key component element.valueBeforeStartDelimiters - array of strings whichstartDelimiters - array of potential start delimitersdelimiters - array of potential delimitersendDelimiters - array of potential end delimiterssettings -
java.util.List of FunctionKeyComponentElement objects
public List findFunctionKeysInRow2(String line,
int startPos,
String[] valueBeforeStartDelimiters,
String[] startDelimiters,
String[] delimiters,
String[] endDelimiters,
Properties settings,
String followString)
java.util.List containing FunctionKeyComponentElement objects, each respresenting a function key found in the specified line.
line - String to look for function keys in.startPos - the (1-based) linear start position of the first character of the line. This is used to set the consumed region for each function key component element.valueBeforeStartDelimiters - array of strings whichstartDelimiters - array of potential start delimitersdelimiters - array of potential delimitersendDelimiters - array of potential end delimiterssettings - followString -
java.util.List of FunctionKeyComponentElement objects
public List findFunctionKeysInRow(String line,
int startPos,
String[] valueBeforeStartDelimiters,
String[] startDelimiters,
String[] delimiters,
String[] endDelimiters,
Properties settings,
String followString)
java.util.List containing FunctionKeyComponentElement objects, each respresenting a function key found in the specified line.
line - String to look for function keys in.startPos - the (1-based) linear start position of the first character of the line. This is used to set the consumed region for each function key component element.valueBeforeStartDelimiters - array of strings whichstartDelimiters - array of potential start delimitersdelimiters - array of potential delimitersendDelimiters - array of potential end delimiterssettings - followString -
java.util.List of FunctionKeyComponentElement objects
protected static int findFirstIndexOfDelimiter(String line,
String[] delimiters)
line - The String to be searched.delimiters - An array of delimiters to search for.
public String[] expandDelimiters(String[] delimiters,
Properties settings)
String objects. Expansion involves converting any # (pound) symbols into a set of delimiters.
delimiters - An array of delimiters.settings - The settings.
String objects. Expansion involves converting any # (pound) symbols into a set of delimiters.public 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 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 | ||||||||