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 VisualTableComponent

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.VisualTableComponent
All Implemented Interfaces:
ICustomPropertySupplier

public class VisualTableComponent
extends AbstractTableComponent

The Visual Table component is responsible for recognizing tables. The Visual Table component is different from the Field Table component in that it does not require that the underlying host screen fields line up vertically. It simply looks for columns in the selected region which contain the column delimiter for each row in the selection. Rule of thumb: If a region looks (to the eye) like a table, the Visual Table component should be able to recognize it.

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
columnDelimiterThe string of characters which must exist in every row of the selected region for the host screen column to be marked as a table column. If consecutive columns are each marked as a delimiting column, only the last column is actually rendered as the delimiting column of the generated table.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)
minRowsThe minimum number of rows the specified region must contain for the region to be recognized as a table. Note: The number of recognized rows is evaluated before the specified rows are excluded (see "Rows to exclude").int1
minColumnsThe minimum number of logical columns (not host screen columns) the specified region must contain for the region to be recognized as a table. Note: The number of recognized columns is evaluated before the specified columns are excluded (see "Columns to exclude").int1


Field Summary
static String CLASS_NAME
           
static String PROPERTY_COLUMN_DELIMITER
           
static String PROPERTY_VALIDATE_CHARACTER_TYPE
           
 
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.ICustomPropertySupplier
CLASSNAME
 
Constructor Summary
VisualTableComponent(HsrScreen hostScreen)
          Constructor for VisualTableComponent.
 
Method Summary
 boolean evalCharIsBreak(int row, int col, HsrScreen hs, Properties settings)
           
 Vector getCustomProperties(int iPageNumber, Properties properties, ResourceBundle bundle)
          Returns a list of this object's custom properties.
 Properties getDefaultValues(int iPageNumber)
          Returns this object's default property values.
 int getPropertyPageCount()
          Returns the number of property pages associated with this object.
 boolean handleCleaningOfSet(com.ibm.hats.common.NumberedSet ns, int d, int start, int end, int min)
           
 int[] modifyDepthTree(com.ibm.hats.common.NumberedSet ns, int[] depth, int shallowest, int deepest, int mincolbreaks, HsrScreen hs)
           
 ComponentElement[] recognize(BlockScreenRegion region, Properties settings)
          Method to recognize components in the specified BlockScreenRegion using the specified settings.
 void refactorBreaks(com.ibm.hats.common.NumberedSet colbreaks, BlockScreenRegion search, HsrScreen hs)
           
 StringBuffer testTable(HsrScreen hs, BlockScreenRegion bsr, Properties settings, boolean defaultrender, ContextAttributes context)
          Deprecated. Internal use only.
 
Methods inherited from class com.ibm.hats.transform.components.AbstractTableComponent
assignSpreadsheetProperties, createEmptyFieldComponentElement, createHeaderRegions, createTableCell, createTableHeader, evalFirstRegionIsBetterTable, evalFirstRegionIsBetterTable, findTables, findTables, handleRemovalFromSet, previouslyRecognized, printIntArray, printNumberedSetTable, printNumberedSetTable, printNumberedSetTable, printNumberedSetTable, protectedandspace, recognize, removeEmptyBottomRowsFromRegion, 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
 

Field Detail

CLASS_NAME

public static final String CLASS_NAME
See Also:
Constant Field Values

PROPERTY_COLUMN_DELIMITER

public static final String PROPERTY_COLUMN_DELIMITER
See Also:
Constant Field Values

PROPERTY_VALIDATE_CHARACTER_TYPE

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

VisualTableComponent

public VisualTableComponent(HsrScreen hostScreen)
Constructor for VisualTableComponent.

Parameters:
hostScreen -
Method Detail

evalCharIsBreak

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

handleCleaningOfSet

public boolean handleCleaningOfSet(com.ibm.hats.common.NumberedSet ns,
                                   int d,
                                   int start,
                                   int end,
                                   int min)
Overrides:
handleCleaningOfSet in class AbstractTableComponent

modifyDepthTree

public int[] modifyDepthTree(com.ibm.hats.common.NumberedSet ns,
                             int[] depth,
                             int shallowest,
                             int deepest,
                             int mincolbreaks,
                             HsrScreen hs)
Overrides:
modifyDepthTree in class AbstractTableComponent

testTable

public StringBuffer testTable(HsrScreen hs,
                              BlockScreenRegion bsr,
                              Properties settings,
                              boolean defaultrender,
                              ContextAttributes context)
Deprecated. Internal use only.

Overrides:
testTable in class AbstractTableComponent

refactorBreaks

public void refactorBreaks(com.ibm.hats.common.NumberedSet colbreaks,
                           BlockScreenRegion search,
                           HsrScreen hs)
Overrides:
refactorBreaks in class AbstractTableComponent

recognize

public ComponentElement[] recognize(BlockScreenRegion region,
                                    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:
region - BlockScreenRegion to search in
settings - recognition settings
Returns:
an array of ComponentElement objects.
See Also:
Component.recognize(BlockScreenRegion, 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

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 iPageNumber)
Description copied from interface: ICustomPropertySupplier
Returns this object's default property values.

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

HATS 7.5.1 (201005110649)