Package ro.sync.ecss.extensions.api
Interface AuthorTableCellSpanProvider
-
- All Superinterfaces:
Extension
- All Known Implementing Classes:
CALSandHTMLTableCellInfoProvider
,CALSandHTMLTableCellSpanProvider
,CALSTableCellInfoProvider
,CALSTableCellSpanProvider
,DITACALSTableCellInfoProvider
,DITASimpleTableCellSpanProvider
,DITATableCellInfoProvider
,DITATableCellSepInfoProvider
,DocbookTableCellSepInfoProvider
,HTMLTableCellInfoProvider
,HTMLTableCellSpanProvider
,ReltableCellSpanProvider
,TEITableCellSpanProvider
@API(type=EXTENDABLE, src=PUBLIC) public interface AuthorTableCellSpanProvider extends Extension
This is an interface for classes which are responsible for providing information about the cell spanning. It should be implemented when the author extension being developed offers support for editing data in tabular form.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Integer
getColSpan(AuthorElement cellElement)
Get the number of columns the given cell spans across.java.lang.Integer
getRowSpan(AuthorElement cellElement)
Get the number of rows that the given cell spans across.boolean
hasColumnSpecifications(AuthorElement tableElement)
This method tells if the table contains column specifications.void
init(AuthorElement tableElement)
This method is called when starting to compute the layout for a table.-
Methods inherited from interface ro.sync.ecss.extensions.api.Extension
getDescription
-
-
-
-
Method Detail
-
getColSpan
java.lang.Integer getColSpan(AuthorElement cellElement)
Get 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 thespanspec
attribute. In case thespanspec
attribute is missing then the column span is defined by thenamest
andnameend
attribute.- 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
null
if not specified.
-
getRowSpan
java.lang.Integer getRowSpan(AuthorElement cellElement)
Get the number of rows that the given cell spans across. For example, for the DocBook CALS tables this value is computed by looking at themorerows
attribute.- Parameters:
cellElement
- TheAuthorElement
that represents a table cell in CSS.- Returns:
- The number of rows this cell spans across (the minimum returned value must be 1)
or
null
if not specified.
-
init
void init(AuthorElement tableElement)
This 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 thecolspec
andspanspec
elements 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..- Parameters:
tableElement
- TheAuthorElement
representing a table (it has the CSS display property set on 'table').
-
hasColumnSpecifications
boolean hasColumnSpecifications(AuthorElement tableElement)
This method tells if the table contains column specifications. For example the CALS table model requirescolspec
elements to be present.- Parameters:
tableElement
- TheAuthorElement
that is rendered as a table.- Returns:
true
if some column specification info is present or if the table doesn't require any column specification info.
-
-