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 ComponentElementList

java.lang.Object
  extended by com.ibm.hats.transform.elements.ComponentElement
      extended by com.ibm.hats.transform.elements.ComponentElementList
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
DialogRowComponentElement, DisabledAreaComponentElement, EnptuiSelectionComponentElement, FieldRowComponentElement, SelectionComponentElement

public class ComponentElementList
extends ComponentElement

This class represents a list of ComponentElement objects.


Field Summary
static String CLASS_NAME
           
protected  List elements
           
 
Fields inherited from class com.ibm.hats.transform.elements.ComponentElement
consumedRegion
 
Constructor Summary
ComponentElementList()
          Constructs a new ComponentElementList object.
ComponentElementList(boolean cacheConsumedRegion)
          Constructs a new ComponentElementList object.
ComponentElementList(ComponentElement[] elements)
          Constructs a new ComponentElementList object that is initially filled (in order) with the specified component elements.
 
Method Summary
 void addElement(ComponentElement element)
          Method to add a component element to the list.
 void addElement(int index, ComponentElement element)
          Method to add a component element to the list at the specified position.
 void addElements(Collection c)
          Method to add a component element to the list.
 Object cloneList()
          Returns a clone of the CEL.
static ScreenRegion computeConsumedRegion(List elems)
          Returns the calculated consumed region of a list of component element objects.
 void doTextReplacement(TextReplacementPair pair, ContextAttributes contextAttributes)
          Performs text replacement on the list.
 void doTextReplacement(TextReplacementPair pair, ContextAttributes contextAttributes, com.ibm.hats.transform.ITextReplacementFilter[] filters)
          Performs text replacement on the list.
 ScreenRegion getConsumedRegion()
          Returns the screen region consumed by the set of elements in the list.
 ComponentElement getElement(int index)
          Returns the element at the specified (0-based) index.
 int getElementCount()
          Returns the number of elements in the list.
 List getElements()
          Returns the internal list of elements (the list is of type java.util.ArrayList).
 ListIterator getIterator()
          Returns a ListIterator which allows for iterating through the list of elements.
 String getPreviewText()
          Returns a concatenation of the preview text of each component element in the list.
 String getPreviewText(String separator)
          Returns a concatenation of the preview text of each component element in the list.
 String getPreviewText(String separator, boolean RTL_flag, boolean RTLScreen)
          BiDi-specific method for retrieving the preview text of the list.
 void removeElement(ComponentElement element)
          Method to remvoe a component element from the list.
 void removeElement(int index)
          Method to remove the component element at the specified index.
 void setScreenId(int id)
           
 
Methods inherited from class com.ibm.hats.transform.elements.ComponentElement
clone, getScreenId, isConsumer, isMatch, isTruncateToPreserveLength, setConsumedRegion, type, type
 
Methods inherited from class java.lang.Object
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

elements

protected List elements
Constructor Detail

ComponentElementList

public ComponentElementList()
Constructs a new ComponentElementList object.


ComponentElementList

public ComponentElementList(boolean cacheConsumedRegion)
Constructs a new ComponentElementList object. The single parameter specifies whether the consumed region is cached or whether it is calculated on every call to getConsumedRegion(). Note: Prior to HATS 7, a call to getConsumedRegion() always calculated the consumed region, even if the list had not changed. To get this behavior in HATS 7 (and above), specify false as the parameter to this constructor.

Parameters:
cacheConsumedRegion -

ComponentElementList

public ComponentElementList(ComponentElement[] elements)
Constructs a new ComponentElementList object that is initially filled (in order) with the specified component elements.

Parameters:
elements -
Method Detail

addElement

public void addElement(ComponentElement element)
Method to add a component element to the list.

Parameters:
element - component element object to add

addElement

public void addElement(int index,
                       ComponentElement element)
Method to add a component element to the list at the specified position.

Parameters:
element - component element object to add

addElements

public void addElements(Collection c)
Method to add a component element to the list.

Parameters:
c - The collection of component element objects to add.

removeElement

public void removeElement(ComponentElement element)
Method to remvoe a component element from the list.

Parameters:
element - component element to remove

removeElement

public void removeElement(int index)
Method to remove the component element at the specified index.

Parameters:
index - 0-based index of the element to remove

getIterator

public ListIterator getIterator()
Returns a ListIterator which allows for iterating through the list of elements.

Returns:
ListIterator

getElementCount

public int getElementCount()
Returns the number of elements in the list.

Returns:
The number of elements in the list.

getElement

public ComponentElement getElement(int index)
Returns the element at the specified (0-based) index.

Parameters:
index - index of the component element to retrieve
Returns:
The element at the specified (0-based) index.

getConsumedRegion

public ScreenRegion getConsumedRegion()
Returns the screen region consumed by the set of elements in the list.

Overrides:
getConsumedRegion in class ComponentElement

computeConsumedRegion

public static ScreenRegion computeConsumedRegion(List elems)
Returns the calculated consumed region of a list of component element objects.

Parameters:
elems - The list of ComponentElement objects for computing the consumed region.
Returns:
The calculated consumed region of a list of component element objects.
See Also:
BlockScreenRegion.compound(ScreenRegion[])

getPreviewText

public String getPreviewText()
Returns a concatenation of the preview text of each component element in the list. Each element is separated with a \n (new line) character.

Specified by:
getPreviewText in class ComponentElement
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()

getPreviewText

public String getPreviewText(String separator)
Returns a concatenation of the preview text of each component element in the list.

Parameters:
separator - A String which separates the preview text of each component element in the list.
Returns:
A concatenation of the preview text of each component element in the list.
See Also:
ComponentElement.getPreviewText()

getPreviewText

public String getPreviewText(String separator,
                             boolean RTL_flag,
                             boolean RTLScreen)
BiDi-specific method for retrieving the preview text of the list.


doTextReplacement

public void doTextReplacement(TextReplacementPair pair,
                              ContextAttributes contextAttributes)
Performs text replacement on the list.

Specified by:
doTextReplacement in class ComponentElement
Parameters:
pair - from/replace with pair
contextAttributes - context attributes

doTextReplacement

public void doTextReplacement(TextReplacementPair pair,
                              ContextAttributes contextAttributes,
                              com.ibm.hats.transform.ITextReplacementFilter[] filters)
Performs text replacement on the list.

Parameters:
pair - from/replace with pair
contextAttributes - context attributes
filters - text replacement array

getElements

public List getElements()
Returns the internal list of elements (the list is of type java.util.ArrayList).

Returns:
list of elements

setScreenId

public void setScreenId(int id)
Overrides:
setScreenId in class ComponentElement

cloneList

public Object cloneList()
Returns a clone of the CEL. This method clones the list without cloning the elements of the list.

Returns:
ComponentElementList

HATS 7.5.1 (201005110649)