Oxygen XML Editor 11.2 Author API

ro.sync.ecss.extensions.commons.table.operations
Interface AuthorTableHelper

All Known Implementing Classes:
AbstractDocumentTypeHelper, CALSDocumentTypeHelper, DITARelTableDocumentTypeHelper, DITASimpleTableDocumentTypeHelper, TEIDocumentTypeHelper, XHTMLDocumentTypeHelper

public interface AuthorTableHelper

Document type specific table information helper. It contains methods that are specific to a document type and are used to obtain table and table cells related information.


Field Summary
static int TYPE_CELL
          The cell type.
static int TYPE_ROW
          The row type.
static int TYPE_TABLE
          The table type.
 
Method Summary
 void checkTableColSpanIsDefined(AuthorAccess authorAccess, AuthorTableCellSpanProvider tableCellSpanProvider, AuthorElement cellElement)
          Check if the column span is defined for a table cell.
 AuthorTableCellSpanProvider getTableCellSpanProvider(AuthorElement tableElement)
          Create the table cell span provider for a specific table element.
 boolean isTable(AuthorNode node)
          Check if an AuthorNode is a table node.
 boolean isTableCell(AuthorNode node)
          Check if an AuthorNode is a table cell node.
 boolean isTableRow(AuthorNode node)
          Check if an AuthorNode is a table row node.
 void updateTableColSpan(AuthorAccess authorAccess, AuthorTableCellSpanProvider tableCellSpanProvider, AuthorElement cellElem, int startCol, int endCol)
          Update the column span of the cell by modifying the indices of start and end column.
 void updateTableColumnNumber(AuthorAccess authorAccess, AuthorElement tableElement, int colNum)
          Update the table columns number.
 void updateTableRowNumber(AuthorAccess authorAccess, AuthorElement tableElement, int relativeValue)
          Update the table rows number.
 void updateTableRowSpan(AuthorAccess authorAccess, AuthorElement cellElem, int rowSpan)
          Updates the cell row span to a specified value.
 

Field Detail

TYPE_CELL

static final int TYPE_CELL
The cell type.

See Also:
Constant Field Values

TYPE_ROW

static final int TYPE_ROW
The row type.

See Also:
Constant Field Values

TYPE_TABLE

static final int TYPE_TABLE
The table type.

See Also:
Constant Field Values
Method Detail

isTableCell

boolean isTableCell(AuthorNode node)
Check if an AuthorNode is a table cell node.

Parameters:
node - The AuthorNode to be checked.
Returns:
true if the node is a table cell node, false otherwise.

isTableRow

boolean isTableRow(AuthorNode node)
Check if an AuthorNode is a table row node.

Parameters:
node - The AuthorNode to be checked.
Returns:
true if the node is a table row node, false otherwise.

isTable

boolean isTable(AuthorNode node)
Check if an AuthorNode is a table node.

Parameters:
node - The AuthorNode to be checked.
Returns:
true if the node is a table node, false otherwise.

getTableCellSpanProvider

AuthorTableCellSpanProvider getTableCellSpanProvider(AuthorElement tableElement)
Create the table cell span provider for a specific table element.

Parameters:
tableElement - The element rendered as a table. Its 'display' CSS property is set to 'table'.
Returns:
The table cell span provider. Must not be null.

checkTableColSpanIsDefined

void checkTableColSpanIsDefined(AuthorAccess authorAccess,
                                AuthorTableCellSpanProvider tableCellSpanProvider,
                                AuthorElement cellElement)
                                throws AuthorOperationException
Check if the column span is defined for a table cell.

I.E. for DocBook the column span is defined by the 'colspec' element. If it is missing then the column span is not defined.

Parameters:
authorAccess - The author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.
tableCellSpanProvider - The table cell span provider.
cellElement - The cell element to be tested.
Throws:
AuthorOperationException - When the column span is not defined for the table cell.

updateTableColSpan

void updateTableColSpan(AuthorAccess authorAccess,
                        AuthorTableCellSpanProvider tableCellSpanProvider,
                        AuthorElement cellElem,
                        int startCol,
                        int endCol)
                        throws AuthorOperationException
Update the column span of the cell by modifying the indices of start and end column. For example, for the DocBook CALS tables the namest and nameend attributes will be set according to the startCol and endCol supplied values.

Parameters:
authorAccess - The author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.
tableCellSpanProvider - The object responsible for providing information about the cell spanning.
cellElem - The cell element whose column span will be updated.
startCol - The new index of start column. It is 1 based and inclusive.
endCol - The new index of end column. It is 1 based and inclusive.
Throws:
AuthorOperationException - When the column specifications for start or end columns are missing.

updateTableRowSpan

void updateTableRowSpan(AuthorAccess authorAccess,
                        AuthorElement cellElem,
                        int rowSpan)
Updates the cell row span to a specified value. For example, for the DocBook CALS tables the morerows attribute value will be updated.

Parameters:
authorAccess - The author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.
cellElem - The cell element whose row span will be updated.
rowSpan - The new row span value. It is 1 based.

updateTableColumnNumber

void updateTableColumnNumber(AuthorAccess authorAccess,
                             AuthorElement tableElement,
                             int colNum)
Update the table columns number. For example, for the DocBook CALS tables the cols attribute value will be updated.

Parameters:
authorAccess - The author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.
tableElement - The element rendered as a table. Its 'display' CSS property is set to 'table'.
colNum - The updated number of columns.

updateTableRowNumber

void updateTableRowNumber(AuthorAccess authorAccess,
                          AuthorElement tableElement,
                          int relativeValue)
Update the table rows number.

Parameters:
authorAccess - The author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.
tableElement - The element rendered as a table. Its 'display' CSS property is set to 'table'.
relativeValue - The number of rows to increase or decrease the current number of table rows. If the number of rows must be decreased then the argument must be negative.

Oxygen XML Editor 11.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2010.