Class TablePropertiesHelperBase
- java.lang.Object
-
- ro.sync.ecss.extensions.commons.table.properties.TablePropertiesHelperBase
-
- All Implemented Interfaces:
TableHelper
,TableHelperConstants
,TablePropertiesConstants
,TablePropertiesHelper
- Direct Known Subclasses:
DITACALSTableHelper
,DocbookCALSTableHelper
,RelTablePropertiesHelper
,SimpleTableHelper
@API(type=INTERNAL, src=PUBLIC) public abstract class TablePropertiesHelperBase extends java.lang.Object implements TablePropertiesHelper
Abstract class for table properties helper.
-
-
Field Summary
-
Fields inherited from interface ro.sync.ecss.extensions.commons.table.properties.TableHelperConstants
TYPE_BODY, TYPE_BODY_DESC_CELL, TYPE_CELL, TYPE_COLSPEC, TYPE_FOOTER, TYPE_GROUP, TYPE_HEADER, TYPE_HEADER_CELL, TYPE_HEADER_DESC_CELL, TYPE_ROW, TYPE_TABLE
-
Fields inherited from interface ro.sync.ecss.extensions.commons.table.properties.TablePropertiesConstants
ALIGN, ATTR_NOT_SET, BOTTOM, CENTER, CHAR, COLSEP, EMPTY_ICON, FRAME, ICON_ALIGN_CENTER, ICON_ALIGN_JUSTIFY, ICON_ALIGN_LEFT, ICON_ALIGN_RIGHT, ICON_COL_ROW_SEP, ICON_COLSEP, ICON_FRAME_ALL, ICON_FRAME_BOTTOM, ICON_FRAME_LHS, ICON_FRAME_RHS, ICON_FRAME_SIDES, ICON_FRAME_TOP, ICON_FRAME_TOPBOT, ICON_ROW_TYPE_BODY, ICON_ROW_TYPE_FOOTER, ICON_ROW_TYPE_HEADER, ICON_ROWSEP, ICON_VALIGN_BOTTOM, ICON_VALIGN_MIDDLE, ICON_VALIGN_TOP, JUSTIFY, LEFT, MIDDLE, NOT_COMPUTED, PRESERVE, RIGHT, ROW_TYPE, ROW_TYPE_BODY, ROW_TYPE_FOOTER, ROW_TYPE_HEADER, ROW_TYPE_PROPERTY, ROWSEP, TITLE_ELEMENT, TOP, VALIGN
-
-
Constructor Summary
Constructors Constructor Description TablePropertiesHelperBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowsFooter()
true
if the current table allows footer element.java.lang.String
getElementName(int elementType)
java.lang.String
getElementTag(int elementType)
Obtain the element name.int
getElementType(AuthorElement node)
Obtain the type of the given node.AuthorElement
getFirstChildOfTypeFromParentWithType(AuthorElement currentRow, int childType, int parentType)
Obtain the first row child of the parent which has the given type.boolean
isNodeOfType(AuthorElement node, int type)
Test if anAuthorNode
is an element and it has one of the following types:AuthorTableHelper.TYPE_CELL
,AuthorTableHelper.TYPE_ROW
orAuthorTableHelper.TYPE_TABLE
.boolean
isTable(AuthorElement node)
Checks if the given node represents the table element.boolean
isTableBody(AuthorElement node)
Checks if the given node represents a table body element.boolean
isTableCell(AuthorElement node)
Checks if the given node represents a table cell element.boolean
isTableColspec(AuthorElement node)
Checks if the given node represents a table colspec element.boolean
isTableFoot(AuthorElement node)
Checks if the given node represents a table foot element.boolean
isTableGroup(AuthorElement node)
Checks if the given node represents a table group element.boolean
isTableHead(AuthorElement node)
Checks if the given node represents a table head element.boolean
isTableRow(AuthorElement node)
Checks if the given node represents a table row element.
-
-
-
Method Detail
-
isTable
public boolean isTable(AuthorElement node)
Description copied from interface:TableHelper
Checks if the given node represents the table element.- Specified by:
isTable
in interfaceTableHelper
- Parameters:
node
- The node to be checked.- Returns:
true
if the given node is the table element.- See Also:
TableHelper.isTable(ro.sync.ecss.extensions.api.node.AuthorElement)
-
isTableGroup
public boolean isTableGroup(AuthorElement node)
Description copied from interface:TableHelper
Checks if the given node represents a table group element.- Specified by:
isTableGroup
in interfaceTableHelper
- Parameters:
node
- The node to be checked.- Returns:
true
if the given node is the table group element.- See Also:
TableHelper.isTableGroup(ro.sync.ecss.extensions.api.node.AuthorElement)
-
isTableBody
public boolean isTableBody(AuthorElement node)
Description copied from interface:TablePropertiesHelper
Checks if the given node represents a table body element.- Specified by:
isTableBody
in interfaceTablePropertiesHelper
- Parameters:
node
- The node to be checked.- Returns:
true
if the given node is a table body element.- See Also:
TablePropertiesHelper.isTableBody(ro.sync.ecss.extensions.api.node.AuthorElement)
-
isTableHead
public boolean isTableHead(AuthorElement node)
Description copied from interface:TablePropertiesHelper
Checks if the given node represents a table head element.- Specified by:
isTableHead
in interfaceTablePropertiesHelper
- Parameters:
node
- The node to be checked.- Returns:
true
if the given node is a table head element.- See Also:
TablePropertiesHelper.isTableHead(ro.sync.ecss.extensions.api.node.AuthorElement)
-
isTableFoot
public boolean isTableFoot(AuthorElement node)
Description copied from interface:TablePropertiesHelper
Checks if the given node represents a table foot element.- Specified by:
isTableFoot
in interfaceTablePropertiesHelper
- Parameters:
node
- The node to be checked.- Returns:
true
if the given node is a table foot element.- See Also:
TablePropertiesHelper.isTableFoot(ro.sync.ecss.extensions.api.node.AuthorElement)
-
isTableRow
public boolean isTableRow(AuthorElement node)
Description copied from interface:TablePropertiesHelper
Checks if the given node represents a table row element.- Specified by:
isTableRow
in interfaceTablePropertiesHelper
- Parameters:
node
- The node to be checked.- Returns:
true
if the given node is a table row element.- See Also:
TablePropertiesHelper.isTableRow(ro.sync.ecss.extensions.api.node.AuthorElement)
-
isTableCell
public boolean isTableCell(AuthorElement node)
Description copied from interface:TablePropertiesHelper
Checks if the given node represents a table cell element.- Specified by:
isTableCell
in interfaceTablePropertiesHelper
- Parameters:
node
- The node to be checked.- Returns:
true
if the given node is a table cell element.- See Also:
TablePropertiesHelper.isTableCell(ro.sync.ecss.extensions.api.node.AuthorElement)
-
isTableColspec
public boolean isTableColspec(AuthorElement node)
Description copied from interface:TablePropertiesHelper
Checks if the given node represents a table colspec element.- Specified by:
isTableColspec
in interfaceTablePropertiesHelper
- Parameters:
node
- The node to be checked.- Returns:
true
if the given node is a table colspec element.- See Also:
TablePropertiesHelper.isTableColspec(ro.sync.ecss.extensions.api.node.AuthorElement)
-
isNodeOfType
public boolean isNodeOfType(AuthorElement node, int type)
Description copied from interface:TableHelper
Test if anAuthorNode
is an element and it has one of the following types:AuthorTableHelper.TYPE_CELL
,AuthorTableHelper.TYPE_ROW
orAuthorTableHelper.TYPE_TABLE
.- Specified by:
isNodeOfType
in interfaceTableHelper
- Parameters:
node
- The node to be checked.type
- The type to search for.- Returns:
true
if thenode
is an element with the specified type.- See Also:
TableHelper.isNodeOfType(ro.sync.ecss.extensions.api.node.AuthorElement, int)
-
allowsFooter
public boolean allowsFooter()
Description copied from interface:TablePropertiesHelper
true
if the current table allows footer element.- Specified by:
allowsFooter
in interfaceTablePropertiesHelper
- Returns:
true
if the table allows footer.- See Also:
TablePropertiesHelper.allowsFooter()
-
getFirstChildOfTypeFromParentWithType
public AuthorElement getFirstChildOfTypeFromParentWithType(AuthorElement currentRow, int childType, int parentType)
Description copied from interface:TablePropertiesHelper
Obtain the first row child of the parent which has the given type. The type could be one of TYPE_HEADED, TYPE_BODY, TYPE_FOOTER.- Specified by:
getFirstChildOfTypeFromParentWithType
in interfaceTablePropertiesHelper
- Parameters:
currentRow
- The current row element.childType
- The type of the child that is needed.parentType
- The type for the parent which will contain the returned row element.- Returns:
- The first row from the parent or null if a parent with the given type is not found or if it does not contain any rows.
- See Also:
TablePropertiesHelper.isTableHead(ro.sync.ecss.extensions.api.node.AuthorElement)
-
getElementType
public int getElementType(AuthorElement node)
Description copied from interface:TablePropertiesHelper
Obtain the type of the given node. Type can be one ofTableHelperConstants.TYPE_TABLE
,TableHelperConstants.TYPE_GROUP
,TableHelperConstants.TYPE_HEADER
,TableHelperConstants.TYPE_BODY
,TableHelperConstants.TYPE_FOOTER
,TableHelperConstants.TYPE_ROW
,TableHelperConstants.TYPE_CELL
,TableHelperConstants.TYPE_COLSPEC
.- Specified by:
getElementType
in interfaceTablePropertiesHelper
- Parameters:
node
- The node to compute type for.- Returns:
- The type of the given node or -1 if the node is not a table node.
- See Also:
TablePropertiesHelper.getElementType(ro.sync.ecss.extensions.api.node.AuthorElement)
-
getElementTag
public java.lang.String getElementTag(int elementType)
Description copied from interface:TablePropertiesHelper
Obtain the element name.- Specified by:
getElementTag
in interfaceTablePropertiesHelper
- Parameters:
elementType
- The type of the element.- Returns:
- the element tag.
- See Also:
TablePropertiesHelper.getElementTag(int)
-
getElementName
public java.lang.String getElementName(int elementType)
- Specified by:
getElementName
in interfaceTablePropertiesHelper
- Parameters:
elementType
- The element type.- Returns:
- The element name.
- See Also:
TablePropertiesHelper.getElementName(int)
-
-