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.elements
Class FunctionKeyComponentElement

java.lang.Object
  extended by com.ibm.hats.transform.elements.ComponentElement
      extended by com.ibm.hats.transform.elements.FunctionKeyComponentElement
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
SelectorAttentionComponentElement

public class FunctionKeyComponentElement
extends ComponentElement

This class represents a function key. A function key is made up of the following parts: item, delimiter, and caption. In the following example:

 F3=Exit
 
"F3" is the item, "=" is the delimiter, and "Exit" is the description.


Field Summary
protected  String caption
           
static String CLASS_NAME
           
protected  String delimiter
           
protected  HsrAttributes extendedAttributes
           
protected  String fullCaption
           
protected  String item
           
protected  String mnemonic
           
protected  List onSelectActions
           
 
Fields inherited from class com.ibm.hats.transform.elements.ComponentElement
consumedRegion
 
Constructor Summary
FunctionKeyComponentElement(String item, String delimiter)
           
FunctionKeyComponentElement(String item, String delimiter, String caption, String fullCaption)
          Constructs a new FunctionKeyComponentElement object.
 
Method Summary
protected  String calculateAidKey(String str)
          Deprecated.  
 void doTextReplacement(TextReplacementPair pair, ContextAttributes contextAttributes)
          Performs text replacement on this element.
protected static int extractNumberFromString(String str)
           
 String getCaption()
          Returns the caption (e.g.
 String getDelimiter()
          Returns the delimiter (e.g.
 HsrAttributes getExtendedAttributes()
          Returns the extended field attributes for the function key item.
 String getFullCaption()
          Returns the full caption (e.g.
 String getItem()
          Returns the item (e.g.
 String getMnemonic()
          Returns the HOD mnemonic that should be sent when the function key represented by this component element is activated.
 List getOnSelectActions()
          Returns a list of ScriptAction objects representing the set of actions that should be performed when this function key is selected (e.g.
 String getPreviewText()
          Returns some form of descriptive text about the component element.
 void setCaption(String caption)
           
 void setDelimiter(String delimiter)
           
 void setExtendedAttributes(HsrAttributes attribs)
          Sets the extended field attributes (color, etc) for the function key item.
 void setFullCaption(String fullCaption)
           
 void setItem(String item)
           
 void setMnemonic(String mnemonic)
           
 void setOnSelectActions(List list)
          Sets the set of ScriptAction objects representing the actions to perform when this function key is selected.
 String toString()
           
 
Methods inherited from class com.ibm.hats.transform.elements.ComponentElement
clone, getConsumedRegion, getScreenId, isConsumer, isMatch, isTruncateToPreserveLength, setConsumedRegion, setScreenId, type, type
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_NAME

public static final String CLASS_NAME
See Also:
Constant Field Values

item

protected String item

delimiter

protected String delimiter

caption

protected String caption

fullCaption

protected String fullCaption

mnemonic

protected String mnemonic

onSelectActions

protected List onSelectActions

extendedAttributes

protected HsrAttributes extendedAttributes
Since:
7.0.0.2
Constructor Detail

FunctionKeyComponentElement

public FunctionKeyComponentElement(String item,
                                   String delimiter)

FunctionKeyComponentElement

public FunctionKeyComponentElement(String item,
                                   String delimiter,
                                   String caption,
                                   String fullCaption)
Constructs a new FunctionKeyComponentElement object.

Parameters:
item - item (the aid key is calculated from this value)
delimiter - String which separates the item from the caption
caption - String caption of the function key
fullCaption - String full caption (item + delimiter + caption + any extra space between any part)
Method Detail

setItem

public void setItem(String item)

setDelimiter

public void setDelimiter(String delimiter)

setCaption

public void setCaption(String caption)

setFullCaption

public void setFullCaption(String fullCaption)

getItem

public String getItem()
Returns the item (e.g. "F1").

Returns:
The item (e.g. "F1").

getDelimiter

public String getDelimiter()
Returns the delimiter (e.g. "=").

Returns:
The delimiter (e.g. "=").

getCaption

public String getCaption()
Returns the caption (e.g. "Exit").

Returns:
The caption (e.g. "Exit").

getFullCaption

public String getFullCaption()
Returns the full caption (e.g. "F1=Exit").

Returns:
The full caption (e.g. "F1=Exit").

toString

public String toString()
Overrides:
toString in class Object

getPreviewText

public String getPreviewText()
Description copied from class: ComponentElement
Returns some form of descriptive text about the component element.

Specified by:
getPreviewText in class ComponentElement

doTextReplacement

public void doTextReplacement(TextReplacementPair pair,
                              ContextAttributes contextAttributes)
Performs text replacement on this element. Text replacement is performed on each part (item, caption, full caption) of the element.

Specified by:
doTextReplacement in class ComponentElement
Parameters:
pair - TextReplacementPair to base replacement on
contextAttributes - context attributes

calculateAidKey

protected String calculateAidKey(String str)
Deprecated. 

Calculates and then returns the HOD mnemonic aid key based on the specified string. For example, specifying the string "F1" would result in "[pf1]" (the HOD mnemonic for the F1 key).

Parameters:
str - To calculate the aid key from.
Returns:
The HOD mnemonic aid key.

extractNumberFromString

protected static int extractNumberFromString(String str)

getOnSelectActions

public List getOnSelectActions()
Returns a list of ScriptAction objects representing the set of actions that should be performed when this function key is selected (e.g. what happens when the button representing this key is clicked).

Returns:
A list of ScriptAction objects.

setOnSelectActions

public void setOnSelectActions(List list)
Sets the set of ScriptAction objects representing the actions to perform when this function key is selected.

Parameters:
list -

setMnemonic

public void setMnemonic(String mnemonic)

getMnemonic

public String getMnemonic()
Returns the HOD mnemonic that should be sent when the function key represented by this component element is activated.

Returns:
The HOD mnemonic.

getExtendedAttributes

public HsrAttributes getExtendedAttributes()
Returns the extended field attributes for the function key item.

Returns:
The extended field attributes for the function key item.
Since:
7.0.0.2

setExtendedAttributes

public void setExtendedAttributes(HsrAttributes attribs)
Sets the extended field attributes (color, etc) for the function key item.

Parameters:
attribs -
Since:
7.0.0.2

HATS 7.5.1 (201005110649)