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 TableComponentElement

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

public class TableComponentElement
extends ComponentElement
implements Cloneable

This class represents a table.

See Also:
FieldTableComponent, VisualTableComponent

Field Summary
static String CLASS_NAME
           
static String RECOGNIZED_INDEX
           
 
Fields inherited from class com.ibm.hats.transform.elements.ComponentElement
consumedRegion
 
Constructor Summary
TableComponentElement(TableCellComponentElement[][] cells)
          Constructs a new TableComponentElement object.
TableComponentElement(TableCellComponentElement[][] cells, String columnDelimiter)
          Constructs a new TableComponentElement object.
 
Method Summary
static TableCellComponentElement[][] addCellsToCols(TableCellComponentElement[][] a_cells, TableCellComponentElement[][] b_cells)
           
static TableCellComponentElement[][] addCellsToRows(TableCellComponentElement[][] a_cells, TableCellComponentElement[][] b_cells)
           
 void addCols(TableCellComponentElement[][] cells)
           
 void addRows(TableCellComponentElement[][] cells)
           
 Object clone()
          Create a copy of this TableComponentElement.
 void doTextReplacement(TextReplacementPair pair, ContextAttributes contextAttributes)
          Peforms text replacement on each cell in the table.
 com.ibm.hats.common.NumberedSet emptyCols()
          Returns the set of empty columns (1-based) in the table.
 TableCellComponentElement getCell(int row, int column)
          Returns the TableCellComponentElement at the specified row and column (1-based).
 TableCellComponentElement[] getCellRow(int row)
          Returns an array of all TableCellComponentElement objects in the specified row.
 TableCellComponentElement[][] getCells()
          Returns the double array of cells.
 int getColumnCount()
          Returns the number of columns represented in the table.
 Properties getComponentSettings()
          Returns the component settings for this element.
 ScreenRegion getConsumedRegion()
          Returns the screen region (block, linear) consumed by this component element.
 ScreenRegion getConsumedTableRegion()
           
 TableComponentElement getHeader()
          Returns the header table component element.
 String getPreviewText()
          Returns some form of descriptive text about the component element.
 int getRowCount()
          Returns the number of rows represented in the table.
 boolean isBlankForLocationColumn(int col)
           
 void prependEmptyColumn()
          This method adds at most one empty column to the beginning of the table
protected  void recalculateTotalRegion()
           
 void removeCols(com.ibm.hats.common.NumberedSet cols)
          Removes the set of columns specified in the cols parameter.
 void removeEmptyCols()
          Method to remove empty columns in the table.
 void removeHeader()
           
 void setCells(TableCellComponentElement[][] cells)
          Sets the double array of cells.
 void setComponentSettings(Properties settings)
          set the component settings for this element
 void setConsumedRegion(ScreenRegion region)
          Set the screen region (block, linear) consumed by this component element.
 void setHeader(TableComponentElement header)
           
 void setScreenId(int id)
           
 
Methods inherited from class com.ibm.hats.transform.elements.ComponentElement
getScreenId, isConsumer, isMatch, isTruncateToPreserveLength, 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

RECOGNIZED_INDEX

public static final String RECOGNIZED_INDEX
See Also:
Constant Field Values
Constructor Detail

TableComponentElement

public TableComponentElement(TableCellComponentElement[][] cells,
                             String columnDelimiter)
Constructs a new TableComponentElement object.

Parameters:
cells -
columnDelimiter -

TableComponentElement

public TableComponentElement(TableCellComponentElement[][] cells)
Constructs a new TableComponentElement object.

Parameters:
cells -
Method Detail

getRowCount

public int getRowCount()
Returns the number of rows represented in the table.

Returns:
The number of rows represented in the table.

getColumnCount

public int getColumnCount()
Returns the number of columns represented in the table.

Returns:
The number of columns represented in the table.

getCell

public TableCellComponentElement getCell(int row,
                                         int column)
Returns the TableCellComponentElement at the specified row and column (1-based).

Parameters:
row - 1-based row number of the cell to get
column - 1-based column number of the cell to get
Returns:
cell

getCellRow

public TableCellComponentElement[] getCellRow(int row)
Returns an array of all TableCellComponentElement objects in the specified row.

Parameters:
row - 1-based row number to get
Returns:
cells

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

getCells

public TableCellComponentElement[][] getCells()
Returns the double array of cells.

Returns:
TableCellComponentElement[][]

setCells

public void setCells(TableCellComponentElement[][] cells)
Sets the double array of cells.

Parameters:
cells - The cells to set

addCellsToRows

public static TableCellComponentElement[][] addCellsToRows(TableCellComponentElement[][] a_cells,
                                                           TableCellComponentElement[][] b_cells)

addCellsToCols

public static TableCellComponentElement[][] addCellsToCols(TableCellComponentElement[][] a_cells,
                                                           TableCellComponentElement[][] b_cells)

clone

public Object clone()
Create a copy of this TableComponentElement.

Overrides:
clone in class ComponentElement

prependEmptyColumn

public void prependEmptyColumn()
This method adds at most one empty column to the beginning of the table


addRows

public void addRows(TableCellComponentElement[][] cells)

addCols

public void addCols(TableCellComponentElement[][] cells)

doTextReplacement

public void doTextReplacement(TextReplacementPair pair,
                              ContextAttributes contextAttributes)
Peforms text replacement on each cell in the table.

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

getHeader

public TableComponentElement getHeader()
Returns the header table component element.

Returns:
The header table component element.

getConsumedRegion

public ScreenRegion getConsumedRegion()
Returns the screen region (block, linear) consumed by this component element.

Overrides:
getConsumedRegion in class ComponentElement

getConsumedTableRegion

public ScreenRegion getConsumedTableRegion()

setConsumedRegion

public void setConsumedRegion(ScreenRegion region)
Set the screen region (block, linear) consumed by this component element.

Overrides:
setConsumedRegion in class ComponentElement

recalculateTotalRegion

protected void recalculateTotalRegion()

setHeader

public void setHeader(TableComponentElement header)

removeHeader

public void removeHeader()

removeEmptyCols

public void removeEmptyCols()
Method to remove empty columns in the table.


emptyCols

public com.ibm.hats.common.NumberedSet emptyCols()
Returns the set of empty columns (1-based) in the table.

Returns:
The set of empty columns (1-based) in the table.

isBlankForLocationColumn

public boolean isBlankForLocationColumn(int col)

removeCols

public void removeCols(com.ibm.hats.common.NumberedSet cols)
Removes the set of columns specified in the cols parameter.

Parameters:
cols -

setScreenId

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

getComponentSettings

public Properties getComponentSettings()
Returns the component settings for this element.

Returns:
The component settings for this element.

setComponentSettings

public void setComponentSettings(Properties settings)
set the component settings for this element


HATS 7.5.1 (201005110649)