Class XHTMLDocumentTypeHelper
java.lang.Object
ro.sync.ecss.extensions.commons.AbstractDocumentTypeHelper
ro.sync.ecss.extensions.commons.table.operations.xhtml.XHTMLDocumentTypeHelper
- All Implemented Interfaces:
AuthorTableHelper,XHTMLConstants
@API(type=INTERNAL,
src=PUBLIC)
public class XHTMLDocumentTypeHelper
extends AbstractDocumentTypeHelper
implements XHTMLConstants
Implementation of the document type helper for XHTML.
-
Field Summary
FieldsFields inherited from interface ro.sync.ecss.extensions.commons.table.operations.AuthorTableHelper
TYPE_CELL, TYPE_ROW, TYPE_TABLEFields inherited from interface ro.sync.ecss.extensions.commons.table.operations.xhtml.XHTMLConstants
ATTRIBUTE_NAME_COLSPAN, ATTRIBUTE_NAME_ID, ATTRIBUTE_NAME_ROWSPAN, ATTRIBUTE_NAME_XML_ID, ELEMENT_NAME_INFORMALTABLE, ELEMENT_NAME_TABLE, ELEMENT_NAME_TD, ELEMENT_NAME_TH, ELEMENT_NAME_THEAD, ELEMENT_NAME_TR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckTableColSpanIsDefined(AuthorAccess authorAccess, AuthorTableCellSpanProvider tableSpanSupport, AuthorElement cellElement) For XHTML, the column span is always defined.String[]Gets the ID attribute names which should be skipped when inserting a new column or row and the attributes from source cell fragments must be copied.String[]Gets the attributes which should be skipped when inserting a new column and the attributes from source cell fragments must be copied.String[]Gets the attributes which should be skipped when using the current row as template for insert operation.String[]Returns the possible local names of the elements that represents a table cell.getTableCellSpanProvider(AuthorElement tableElement) Create the table cell span provider for a specific table element.String[]Returns the possible local names of the elements that represents a table.String[]Return the possible local names of the elements that represent a table row.voidupdateTableColSpan(AuthorAccess authorAccess, AuthorTableCellSpanProvider tableSupport, AuthorElement cellElement, int startCol, int endCol) Update the 'colspan' attribute.voidupdateTableColumnNumber(AuthorAccess authorAccess, AuthorElement tableElement, int colNum) Update the table columns number.voidupdateTableRowNumber(AuthorAccess authorAccess, AuthorElement tableElement, int rowsNumber) Update the table rows number.voidupdateTableRowSpan(AuthorAccess authorAccess, AuthorElement cellElement, int rowSpan) Updates the cell row span to a specified value.Methods inherited from class ro.sync.ecss.extensions.commons.AbstractDocumentTypeHelper
getAllowedCellAttributesToCopy, getTableElementForDeletion, isColspec, isContentReference, isElement, isTable, isTableCell, isTableRow
-
Field Details
-
TABLE_ELEMENT_NAMES
Table element names.
-
-
Constructor Details
-
XHTMLDocumentTypeHelper
public XHTMLDocumentTypeHelper()
-
-
Method Details
-
checkTableColSpanIsDefined
public void checkTableColSpanIsDefined(AuthorAccess authorAccess, AuthorTableCellSpanProvider tableSpanSupport, AuthorElement cellElement) throws AuthorOperationException For XHTML, the column span is always defined.- Specified by:
checkTableColSpanIsDefinedin interfaceAuthorTableHelper- Parameters:
authorAccess- The author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.tableSpanSupport- 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.- See Also:
-
getTableCellElementNames
Description copied from class:AbstractDocumentTypeHelperReturns the possible local names of the elements that represents a table cell.- Specified by:
getTableCellElementNamesin classAbstractDocumentTypeHelper- Returns:
- The local names of the elements that represents a table cell.
Not
null. - See Also:
-
getTableElementLocalName
Description copied from class:AbstractDocumentTypeHelperReturns the possible local names of the elements that represents a table.- Specified by:
getTableElementLocalNamein classAbstractDocumentTypeHelper- Returns:
- The local names of the elements that represents a table.
- See Also:
-
getTableRowElementNames
Description copied from class:AbstractDocumentTypeHelperReturn the possible local names of the elements that represent a table row.- Specified by:
getTableRowElementNamesin classAbstractDocumentTypeHelper- Returns:
- The local names of the elements that represent a table row.
- See Also:
-
getTableCellSpanProvider
Description copied from interface:AuthorTableHelperCreate the table cell span provider for a specific table element.- Specified by:
getTableCellSpanProviderin interfaceAuthorTableHelper- 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. - See Also:
-
updateTableColSpan
public void updateTableColSpan(AuthorAccess authorAccess, AuthorTableCellSpanProvider tableSupport, AuthorElement cellElement, int startCol, int endCol) Update the 'colspan' attribute.- Specified by:
updateTableColSpanin interfaceAuthorTableHelper- Parameters:
authorAccess- The author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.tableSupport- The object responsible for providing information about the cell spanning.cellElement- 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.- See Also:
-
updateTableRowSpan
Description copied from interface:AuthorTableHelperUpdates the cell row span to a specified value. For example, for the DocBook CALS tables themorerowsattribute value will be updated.- Specified by:
updateTableRowSpanin interfaceAuthorTableHelper- Parameters:
authorAccess- The author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.cellElement- The cell element whose row span will be updated.rowSpan- The new row span value. It is 1 based.- See Also:
-
updateTableColumnNumber
public void updateTableColumnNumber(AuthorAccess authorAccess, AuthorElement tableElement, int colNum) Description copied from interface:AuthorTableHelperUpdate the table columns number. For example, for the DocBook CALS tables thecolsattribute value will be updated.- Specified by:
updateTableColumnNumberin interfaceAuthorTableHelper- 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.- See Also:
-
updateTableRowNumber
public void updateTableRowNumber(AuthorAccess authorAccess, AuthorElement tableElement, int rowsNumber) Description copied from interface:AuthorTableHelperUpdate the table rows number.- Specified by:
updateTableRowNumberin interfaceAuthorTableHelper- 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'.rowsNumber- 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.- See Also:
-
getIgnoredColumnAttributes
Description copied from interface:AuthorTableHelperGets the attributes which should be skipped when inserting a new column and the attributes from source cell fragments must be copied.- Specified by:
getIgnoredColumnAttributesin interfaceAuthorTableHelper- Returns:
- The attributes which should be skipped.
- See Also:
-
getIgnoredCellIDAttributes
Description copied from interface:AuthorTableHelperGets the ID attribute names which should be skipped when inserting a new column or row and the attributes from source cell fragments must be copied.- Specified by:
getIgnoredCellIDAttributesin interfaceAuthorTableHelper- Returns:
- The ID attributes which should be skipped.
- See Also:
-
getIgnoredRowAttributes
Description copied from interface:AuthorTableHelperGets the attributes which should be skipped when using the current row as template for insert operation.- Specified by:
getIgnoredRowAttributesin interfaceAuthorTableHelper- Returns:
- The attributes which should be skipped.
- See Also:
-