Class ReltableCellSpanProvider
java.lang.Object
ro.sync.ecss.extensions.dita.map.table.ReltableCellSpanProvider
- All Implemented Interfaces:
AuthorTableCellSpanProvider,Extension
@API(type=INTERNAL,
src=PUBLIC)
public class ReltableCellSpanProvider
extends Object
implements AuthorTableCellSpanProvider
The DITA reltable cell span provider.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetColSpan(AuthorElement cellElement) Get the number of columns the given cell spans across.getRowSpan(AuthorElement cellElement) Get the number of rows that the given cell spans across.booleanhasColumnSpecifications(AuthorElement tableElement) This method tells if the table contains column specifications.voidinit(AuthorElement tableElement) This method is called when starting to compute the layout for a table.
-
Constructor Details
-
ReltableCellSpanProvider
public ReltableCellSpanProvider()
-
-
Method Details
-
getColSpan
Description copied from interface:AuthorTableCellSpanProviderGet the number of columns the given cell spans across. For example, for the DocBook CALS tables the number of columns the cell spans across is computed by looking at thespanspecattribute. In case thespanspecattribute is missing then the column span is defined by thenamestandnameendattribute.- Specified by:
getColSpanin interfaceAuthorTableCellSpanProvider- Parameters:
cellElement- The node that represents a table cell in CSS.- Returns:
- The number of columns this cell spans across (the minimum returned value must be 1)
or
nullif not specified. - See Also:
-
getRowSpan
Description copied from interface:AuthorTableCellSpanProviderGet the number of rows that the given cell spans across. For example, for the DocBook CALS tables this value is computed by looking at themorerowsattribute.- Specified by:
getRowSpanin interfaceAuthorTableCellSpanProvider- Parameters:
cellElement- TheAuthorElementthat represents a table cell in CSS.- Returns:
- The number of rows this cell spans across (the minimum returned value must be 1)
or
nullif not specified. - See Also:
-
init
Description copied from interface:AuthorTableCellSpanProviderThis method is called when starting to compute the layout for a table. Its intended to extract information from the element representing the table only once, not on every getColSpan() or getRowSpan() call. Example: for a DocBook table we identify and cache thecolspecandspanspecelements from that table. A new instance of the table cell span provider is used for every table in a document so cached data cannot be used between different tables..- Specified by:
initin interfaceAuthorTableCellSpanProvider- Parameters:
tableElement- TheAuthorElementrepresenting a table (it has the CSS display property set on 'table').- See Also:
-
getDescription
- Specified by:
getDescriptionin interfaceExtension- Returns:
- The description of the extension.
- See Also:
-
hasColumnSpecifications
Description copied from interface:AuthorTableCellSpanProviderThis method tells if the table contains column specifications. For example the CALS table model requirescolspecelements to be present.- Specified by:
hasColumnSpecificationsin interfaceAuthorTableCellSpanProvider- Parameters:
tableElement- TheAuthorElementthat is rendered as a table.- Returns:
trueif some column specification info is present or if the table doesn't require any column specification info.- See Also:
-