com.ibm.hats.transform.elements
Class FieldRowComponentElement
java.lang.Object
com.ibm.hats.transform.elements.ComponentElement
com.ibm.hats.transform.elements.ComponentElementList
com.ibm.hats.transform.elements.FieldRowComponentElement
- All Implemented Interfaces:
- Cloneable
- Direct Known Subclasses:
- SubfileDataComponentElementV6, SubfileHeaderComponentElementV6
public class FieldRowComponentElement
- extends ComponentElementList
The FieldRowComponentElement represents a set of fields.
Note: The FieldComponent, for each row in the specified host screen, will return a FieldRowComponentElement object.
| Methods inherited from class com.ibm.hats.transform.elements.ComponentElementList |
addElement, addElement, addElements, cloneList, computeConsumedRegion, doTextReplacement, getConsumedRegion, getElement, getElementCount, getElements, getIterator, getPreviewText, getPreviewText, removeElement, removeElement, setScreenId |
CLASS_NAME
public static final String CLASS_NAME
- See Also:
- Constant Field Values
FieldRowComponentElement
public FieldRowComponentElement()
- Constructs an empty
FieldRowComponentElement
getPreviewText
public String getPreviewText()
- Description copied from class:
ComponentElementList
- Returns a concatenation of the preview text of each component element in the list. Each element is separated with a \n (new line) character.
- Overrides:
getPreviewText in class ComponentElementList
- Returns:
- A concatenation of the preview text of each component element in the list. Each element is separated with a \n (new line) character.
- See Also:
ComponentElement.getPreviewText()
doTextReplacement
public void doTextReplacement(TextReplacementPair pair,
ContextAttributes contextAttributes)
- Performs text replacement on the set of fields.
This algorithm will preserve the overall length of the combined text values of the fields.
For example, if the combined length of all fields in the row was 80, the length will remain 80 after this method completes (even if the replacement text is longer than the "from" text).
This method will "borrow" extra space from the next field if extra space is needed to perform the text replacement. If extra space is not available, the replacement value will be truncated.
- Overrides:
doTextReplacement in class ComponentElementList
- Parameters:
pair - from/replace with paircontextAttributes - context attributes