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.components
Class TableComponent

java.lang.Object
  extended by com.ibm.hats.transform.components.Component
      extended by com.ibm.hats.transform.components.AbstractTableComponent
          extended by com.ibm.hats.transform.components.TableComponent
All Implemented Interfaces:
ICustomPropertySupplier, com.ibm.hats.common.ICustomPropertySupplier2

public class TableComponent
extends AbstractTableComponent
implements com.ibm.hats.common.ICustomPropertySupplier2

The Table component is responsible for fixed column table in a specified region of a host screen.

A recognized table can be rendered by the following widgets:

The recognize() methods of this component return ComponentElement objects of type: The following settings can be configured for this component:

PropertyDescriptionTypeDefault Value
columnBreaksThe comma-separated or ranged set of logical columns to specify the column breaks from selected screen region to customize a table column definition. Example values: "10,20,30....", "20,30-35", "30-35"String(one space)
includeEmptyRowsIf true, empty rows (rows without any visible text or input fields) will be included in the rendered table or graph.booleantrue
excludeRowsThe comma-separated or ranged set of rows to exclude from the recognized table. This setting is useful for hiding specific rows of data on a table or graph. The rows represented by this value are based on the recognized table, not on the actual host screen. Example values: "1,2,3....", "1,2-4", "3-5".String(empty)
excludeColsThe comma-separated or ranged set of logical columns to exclude from the recognized table. The columns represented by this value are based on the recognized table, not on the actual host screen. Example values: "1,2,3....", "1,2-4", "3-5".String(empty)
numberOfTitleRowsSpecify the number of rows to be used as the table title. int0
startRowFirst row to look for the table dataint4
startColFirst column to look for the table dataint1
endRowFirst row to look for the table dataint22
endColFirst column to look for the table dataint80


Field Summary
static String CLASS_NAME
           
static String PROPERTY_COLUMN_BREAKS
           
static String PROPERTY_COLUMN_BREAKS_DEFAULT
           
static String PROPERTY_COLUMN_VISUAL_TABLE_DEFAULT
           
static String PROPERTY_NUMBER_OF_TITLE_ROWS
           
static String PROPERTY_NUMBER_OF_TITLE_ROWS_DEFAULT
           
static String PROPERTY_SELECT_REGION_END_COL
           
static int PROPERTY_SELECT_REGION_END_COL_DEFAULT
           
static String PROPERTY_SELECT_REGION_END_ROW
           
static int PROPERTY_SELECT_REGION_END_ROW_DEFAULT
           
static String PROPERTY_SELECT_REGION_START_COL
           
static int PROPERTY_SELECT_REGION_START_COL_DEFAULT
           
static String PROPERTY_SELECT_REGION_START_ROW
           
static int PROPERTY_SELECT_REGION_START_ROW_DEFAULT
           
 
Fields inherited from class com.ibm.hats.transform.components.AbstractTableComponent
defaults, PROPERTY_BETTER_FOUND_TABLE_HAS_BETTER_PARAMETER, PROPERTY_BETTER_FOUND_TABLE_HAS_LEAST, PROPERTY_CELL_BREAKS, PROPERTY_EXCLUDE_COLS, PROPERTY_EXCLUDE_ROWS, PROPERTY_INCLUDE_EMPTY_ROWS, PROPERTY_MIN_COLUMNS, PROPERTY_MIN_ROWS, PROPERTY_OVERRIDE_RENDERING_TYPE, PROPERTY_RENDER_BEHAVIOR_AS_DEFAULT, PROPERTY_RENDER_DEFAULT_AS_GUIDE, PROPERTY_TABLE_EVALUATION_SETTING_ABSTRACT_AREA, PROPERTY_TABLE_EVALUATION_SETTING_ABSTRACT_CELL_COUNT, PROPERTY_TABLE_EVALUATION_SETTING_ABSTRACT_COL_COUNT, PROPERTY_TABLE_EVALUATION_SETTING_ABSTRACT_FIRST, PROPERTY_TABLE_EVALUATION_SETTING_ABSTRACT_HEIGHT, PROPERTY_TABLE_EVALUATION_SETTING_ABSTRACT_SECOND, PROPERTY_TABLE_EVALUATION_SETTING_ABSTRACT_WIDTH, PROPERTY_TABLE_HIGHLIGHT_FIRST_ROW, PROPERTY_TABLE_HIGHLIGHT_PREVIOUS_ROW, SPREAD_SHEET_RECOGNIZE_REGION
 
Fields inherited from class com.ibm.hats.transform.components.Component
contextAttributes, flag, hostScreen
 
Fields inherited from interface com.ibm.hats.common.ICustomPropertySupplier2
CLASSNAME
 
Constructor Summary
TableComponent(HsrScreen hostScreen)
          Constructor for TableComponent.
 
Method Summary
 boolean evalCharIsBreak(int row, int col, HsrScreen hs, Properties settings)
           
 String getCustomCompositeName()
           
 Vector getCustomProperties(int iPageNumber, Properties properties, ResourceBundle bundle)
          Returns a list of this object's custom properties.
 Properties getDefaultValues(int arg0)
          Returns this object's default property values.
 int getPropertyPageCount()
          Returns the number of property pages associated with this object.
static boolean isValidColumnBreak(HsrScreen hs, ScreenRegion bsr, int col)
          Check the column break position is valid value of region.
 ComponentElement[] recognize(BlockScreenRegion bsr, Properties settings)
          Method to recognize components in the specified BlockScreenRegion using the specified settings.
 ComponentElement[] recognize(com.ibm.hats.transform.regions.LinearScreenRegion arg0, Properties arg1)
          Currently not implemented.
static com.ibm.hats.common.NumberedSet removeInvaildBreaks(com.ibm.hats.common.NumberedSet breaks, HsrScreen hs, ScreenRegion bsr)
          Check and remove the invalid column break position from a break set.
 
Methods inherited from class com.ibm.hats.transform.components.AbstractTableComponent
assignSpreadsheetProperties, createEmptyFieldComponentElement, createHeaderRegions, createTableCell, createTableHeader, evalFirstRegionIsBetterTable, evalFirstRegionIsBetterTable, findTables, findTables, handleCleaningOfSet, handleRemovalFromSet, modifyDepthTree, previouslyRecognized, printIntArray, printNumberedSetTable, printNumberedSetTable, printNumberedSetTable, printNumberedSetTable, protectedandspace, refactorBreaks, removeEmptyBottomRowsFromRegion, testTable, testTable, track
 
Methods inherited from class com.ibm.hats.transform.components.Component
convertPosToCol, convertPosToRow, convertRowColToPos, findFirstDelimiterIndex, findFirstIndexOf, findFirstIndexOf, findFirstIndexOf, findFirstNonWhitespaceIndex, findFirstNonWhitespaceIndex, findFirstNonWhitespaceIndex, getContextAttribute, getContextAttributes, getCustomComposite, 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
 
Methods inherited from interface com.ibm.hats.common.ICustomPropertySupplier
getCustomComposite
 

Field Detail

CLASS_NAME

public static final String CLASS_NAME
See Also:
Constant Field Values

PROPERTY_COLUMN_BREAKS

public static final String PROPERTY_COLUMN_BREAKS
See Also:
Constant Field Values

PROPERTY_NUMBER_OF_TITLE_ROWS

public static final String PROPERTY_NUMBER_OF_TITLE_ROWS
See Also:
Constant Field Values

PROPERTY_COLUMN_VISUAL_TABLE_DEFAULT

public static final String PROPERTY_COLUMN_VISUAL_TABLE_DEFAULT
See Also:
Constant Field Values

PROPERTY_SELECT_REGION_START_ROW

public static final String PROPERTY_SELECT_REGION_START_ROW
See Also:
Constant Field Values

PROPERTY_SELECT_REGION_START_COL

public static final String PROPERTY_SELECT_REGION_START_COL
See Also:
Constant Field Values

PROPERTY_SELECT_REGION_END_ROW

public static final String PROPERTY_SELECT_REGION_END_ROW
See Also:
Constant Field Values

PROPERTY_SELECT_REGION_END_COL

public static final String PROPERTY_SELECT_REGION_END_COL
See Also:
Constant Field Values

PROPERTY_COLUMN_BREAKS_DEFAULT

public static final String PROPERTY_COLUMN_BREAKS_DEFAULT
See Also:
Constant Field Values

PROPERTY_NUMBER_OF_TITLE_ROWS_DEFAULT

public static final String PROPERTY_NUMBER_OF_TITLE_ROWS_DEFAULT
See Also:
Constant Field Values

PROPERTY_SELECT_REGION_START_ROW_DEFAULT

public static final int PROPERTY_SELECT_REGION_START_ROW_DEFAULT
See Also:
Constant Field Values

PROPERTY_SELECT_REGION_START_COL_DEFAULT

public static final int PROPERTY_SELECT_REGION_START_COL_DEFAULT
See Also:
Constant Field Values

PROPERTY_SELECT_REGION_END_ROW_DEFAULT

public static final int PROPERTY_SELECT_REGION_END_ROW_DEFAULT
See Also:
Constant Field Values

PROPERTY_SELECT_REGION_END_COL_DEFAULT

public static final int PROPERTY_SELECT_REGION_END_COL_DEFAULT
See Also:
Constant Field Values
Constructor Detail

TableComponent

public TableComponent(HsrScreen hostScreen)
Constructor for TableComponent.

Parameters:
hostScreen -
Method Detail

evalCharIsBreak

public boolean evalCharIsBreak(int row,
                               int col,
                               HsrScreen hs,
                               Properties settings)
Specified by:
evalCharIsBreak in class AbstractTableComponent

recognize

public ComponentElement[] recognize(BlockScreenRegion bsr,
                                    Properties settings)
Description copied from class: Component
Method to recognize components in the specified BlockScreenRegion using the specified settings.

This method must be implemented if the base class is subclassed.

Specified by:
recognize in class Component
Parameters:
bsr - BlockScreenRegion to search in
settings - recognition settings
Returns:
an array of ComponentElement objects.

recognize

public ComponentElement[] recognize(com.ibm.hats.transform.regions.LinearScreenRegion arg0,
                                    Properties arg1)
Description copied from class: Component
Currently not implemented.

This method must be implemented if the base class is subclassed.

Overrides:
recognize in class AbstractTableComponent
See Also:
Component.recognize(LinearScreenRegion, Properties)

getCustomProperties

public Vector getCustomProperties(int iPageNumber,
                                  Properties properties,
                                  ResourceBundle bundle)
Description copied from interface: ICustomPropertySupplier
Returns a list of this object's custom properties. Items must be of type com.ibm.hats.common.HCustomProperty.

Specified by:
getCustomProperties in interface ICustomPropertySupplier
Overrides:
getCustomProperties in class AbstractTableComponent
Parameters:
iPageNumber - page number containing desired properties
properties - existing values for properties defined here
bundle - ResourceBundle containing NLS descriptions for the properties
Returns:
Vector containing all the custom properties for this object, or null if there are none
See Also:
HCustomProperty

getDefaultValues

public Properties getDefaultValues(int arg0)
Description copied from interface: ICustomPropertySupplier
Returns this object's default property values.

Specified by:
getDefaultValues in interface ICustomPropertySupplier
Overrides:
getDefaultValues in class Component
Parameters:
arg0 - page for which to retrieve default properties
Returns:
object's default properties

getPropertyPageCount

public int getPropertyPageCount()
Description copied from interface: ICustomPropertySupplier
Returns the number of property pages associated with this object.

Note: Currently only 0 or 1 pages are supported.

Specified by:
getPropertyPageCount in interface ICustomPropertySupplier
Overrides:
getPropertyPageCount in class Component
Returns:
the number of defined property pages used to configure this object, or 0 if there are none

getCustomCompositeName

public String getCustomCompositeName()
Specified by:
getCustomCompositeName in interface com.ibm.hats.common.ICustomPropertySupplier2

isValidColumnBreak

public static boolean isValidColumnBreak(HsrScreen hs,
                                         ScreenRegion bsr,
                                         int col)
Check the column break position is valid value of region.

Parameters:
hs - The host screen object.
bsr - The region of the screen to retrieve.
col - The column position for valid break check.
Returns:
A boolean indicator on the validity of the column break position vaule of the region.

removeInvaildBreaks

public static com.ibm.hats.common.NumberedSet removeInvaildBreaks(com.ibm.hats.common.NumberedSet breaks,
                                                                  HsrScreen hs,
                                                                  ScreenRegion bsr)
Check and remove the invalid column break position from a break set.

Parameters:
breaks - Original break set.
hs - The host screen object.
bsr - The region of the screen to retrieve.
Returns:
The modified NumberedSet object.

HATS 7.5.1 (201005110649)