@API(type=EXTENDABLE, src=PUBLIC) public interface AuthorTableColumnWidthProvider extends Extension
Modifier and Type | Method and Description |
---|---|
void |
commitColumnWidthModifications(AuthorDocumentController authorDocumentController,
WidthRepresentation[] colWidths,
java.lang.String tableCellsTagName)
Updates the column widths in the document and in the column layout model.
|
void |
commitTableWidthModification(AuthorDocumentController authorDocumentController,
int newTableWidth,
java.lang.String tableCellsTagName)
Commit the table width modification.
|
java.util.List<WidthRepresentation> |
getCellWidth(AuthorElement cellElement,
int colNumberStart,
int colSpan)
Get the width representation for the cell represented by the
cellElement . |
WidthRepresentation |
getTableWidth(java.lang.String tableCellsTagName)
Returns a non null
WidthRepresentation if the table width is currently known. |
void |
init(AuthorElement tableElement)
This method is called when starting to compute the layout for a table.
|
boolean |
isAcceptingFixedColumnWidths(java.lang.String tableCellsTagName)
Check if the table column widths can be represented as fixed values.
|
boolean |
isAcceptingPercentageColumnWidths(java.lang.String tableCellsTagName)
Check if the table column widths can be represented as percentage values.
|
boolean |
isAcceptingProportionalColumnWidths(java.lang.String tableCellsTagName)
Check if the table column widths can be represented as proportional values.
|
boolean |
isTableAcceptingWidth(java.lang.String tableCellsTagName)
Used to determine if the table accepts width specification.
|
boolean |
isTableAndColumnsResizable(java.lang.String tableCellsTagName)
This method is used to check if the table and/or table columns can be resized.
|
getDescription
java.util.List<WidthRepresentation> getCellWidth(AuthorElement cellElement, int colNumberStart, int colSpan)
cellElement
.
WidthRepresentation
for each column the cell spans across.cellElement
- The node that represents a table cell in CSS.colNumberStart
- The column number the cell starts at.colSpan
- The column span of the cell.WidthRepresentation
of the
specified cell element or null
if the cell width cannot be computed.
If the cell spans over multiple columns then the returned list will contain one WidthRepresentation
for each column the cell spans over.void init(AuthorElement tableElement)
tableElement
- The element representing a table (it has the CSS display property
set on 'table').void commitColumnWidthModifications(AuthorDocumentController authorDocumentController, WidthRepresentation[] colWidths, java.lang.String tableCellsTagName) throws AuthorOperationException
colwidth
attribute value of the colspec
elements.
New colspec
elements will be added if needed.authorDocumentController
- The AuthorDocumentController
used to commit the table modifications
in the document.colWidths
- The new column WidthRepresentation
to set. The column widths must be ordered
according to the corresponding column numbers.tableCellsTagName
- The cells tag name. Used to identify the table type (e.g. 'entry' for CALS or 'td' for HTML).AuthorOperationException
- If the operation fails.void commitTableWidthModification(AuthorDocumentController authorDocumentController, int newTableWidth, java.lang.String tableCellsTagName) throws AuthorOperationException
width
attribute value of the table
element.authorDocumentController
- The AuthorDocumentController
used to commit the table width modifications
in the document.newTableWidth
- The new table WidthRepresentation
to set. The value is given in pixels.tableCellsTagName
- The cells tag name. Used to identify the table type (e.g. 'entry' for CALS or 'td' for HTML).AuthorOperationException
- If the operation fails.boolean isTableAcceptingWidth(java.lang.String tableCellsTagName)
width
attribute the method will return false
.tableCellsTagName
- The cells tag name. Used to identify the table type (e.g. 'entry' for CALS or 'td' for HTML).true
if the table type denoted by the tableCellsTagName
accepts width specification
of any kind.WidthRepresentation getTableWidth(java.lang.String tableCellsTagName)
WidthRepresentation
if the table width is currently known.
WidthRepresentation
obtained by analyzing the
width
attribute value of the table
element.tableCellsTagName
- The cells tag name. Used to identify the table type (e.g. 'entry' for CALS or 'td' for HTML).null
value if the table width is specified. Otherwise null
.boolean isTableAndColumnsResizable(java.lang.String tableCellsTagName)
true
only if the given table cells tag name is equal to 'entry'
.tableCellsTagName
- The cells tag name. Used to identify the table type (e.g. CALS or HTML).true
if the size of the table or the table cells can be adjusted.boolean isAcceptingFixedColumnWidths(java.lang.String tableCellsTagName)
tableCellsTagName
- The cells tag name. Used to identify the table type
(e.g. CALS or HTML).true
if the table column widths can be represented in
fixed values.boolean isAcceptingProportionalColumnWidths(java.lang.String tableCellsTagName)
tableCellsTagName
- The cells tag name. Used to identify the table type
(e.g. CALS or HTML).true
if the table column widths can be represented in
proportional values.boolean isAcceptingPercentageColumnWidths(java.lang.String tableCellsTagName)
tableCellsTagName
- The cells tag name. Used to identify the table type
(e.g. CALS or HTML).true
if the table column widths can be represented in
percentage values.© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.