|
Oxygen XML Editor 14.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ro.sync.ecss.extensions.commons.table.support.DITATableCellInfoProvider
@API(type=INTERNAL, src=PUBLIC) public class DITATableCellInfoProvider
Provides information about the column width for DITA tables.
Constructor Summary | |
---|---|
DITATableCellInfoProvider()
|
Method Summary | |
---|---|
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 . |
java.lang.Integer |
getColSpan(AuthorElement cellElement)
Get the number of columns the given cell spans across. |
java.lang.String |
getDescription()
|
java.lang.Integer |
getRowSpan(AuthorElement cellElement)
Get the number of rows that the given cell spans across. |
WidthRepresentation |
getTableWidth(java.lang.String tableCellsTagName)
Returns a non null WidthRepresentation if the table width is currently known. |
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. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DITATableCellInfoProvider()
Method Detail |
---|
public void init(AuthorElement tableElement)
AuthorTableCellSpanProvider
colspec
and spanspec
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..
init
in interface AuthorTableCellSpanProvider
init
in interface AuthorTableColumnWidthProvider
tableElement
- The AuthorElement
representing a table (it has the CSS display property
set on 'table').AuthorTableCellSpanProvider.init(ro.sync.ecss.extensions.api.node.AuthorElement)
public java.lang.Integer getColSpan(AuthorElement cellElement)
AuthorTableCellSpanProvider
spanspec
attribute. In case the spanspec
attribute is missing then the column span is defined by the namest
and nameend
attribute.
getColSpan
in interface AuthorTableCellSpanProvider
cellElement
- The node that represents a table cell in CSS.
null
if not specified.AuthorTableCellSpanProvider.getColSpan(ro.sync.ecss.extensions.api.node.AuthorElement)
public java.lang.Integer getRowSpan(AuthorElement cellElement)
AuthorTableCellSpanProvider
morerows
attribute.
getRowSpan
in interface AuthorTableCellSpanProvider
cellElement
- The AuthorElement
that represents a table cell in CSS.
null
if not specified.AuthorTableCellSpanProvider.getRowSpan(ro.sync.ecss.extensions.api.node.AuthorElement)
public boolean hasColumnSpecifications(AuthorElement tableElement)
AuthorTableCellSpanProvider
colspec
elements to be present.
hasColumnSpecifications
in interface AuthorTableCellSpanProvider
tableElement
- The AuthorElement
that is rendered as a table.
true
if some column specification info is present or if the table doesn't
require any column specification info.AuthorTableCellSpanProvider.hasColumnSpecifications(ro.sync.ecss.extensions.api.node.AuthorElement)
public java.lang.String getDescription()
getDescription
in interface Extension
Extension.getDescription()
public java.util.List<WidthRepresentation> getCellWidth(AuthorElement cellElement, int colNumberStart, int colSpan)
AuthorTableColumnWidthProvider
cellElement
.
WidthRepresentation
for each column the cell spans across.
getCellWidth
in interface AuthorTableColumnWidthProvider
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.
If the cell spans over multiple columns then the returned list will contain one WidthRepresentation
for each column the cell spans over.AuthorTableColumnWidthProvider.getCellWidth(ro.sync.ecss.extensions.api.node.AuthorElement, int, int)
public void commitColumnWidthModifications(AuthorDocumentController authorDocumentController, WidthRepresentation[] colWidths, java.lang.String tableCellsTagName) throws AuthorOperationException
AuthorTableColumnWidthProvider
colwidth
attribute value of the colspec
elements.
New colspec
elements will be added if needed.
commitColumnWidthModifications
in interface AuthorTableColumnWidthProvider
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.AuthorTableColumnWidthProvider.commitColumnWidthModifications(AuthorDocumentController, ro.sync.ecss.extensions.api.WidthRepresentation[], java.lang.String)
public void commitTableWidthModification(AuthorDocumentController authorDocumentController, int newTableWidth, java.lang.String tableCellsTagName) throws AuthorOperationException
AuthorTableColumnWidthProvider
width
attribute value of the table
element.
commitTableWidthModification
in interface AuthorTableColumnWidthProvider
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.AuthorTableColumnWidthProvider.commitTableWidthModification(AuthorDocumentController, int, java.lang.String)
public WidthRepresentation getTableWidth(java.lang.String tableCellsTagName)
AuthorTableColumnWidthProvider
WidthRepresentation
if the table width is currently known.
WidthRepresentation
obtained by analyzing the
width
attribute value of the table
element.
getTableWidth
in interface AuthorTableColumnWidthProvider
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
.AuthorTableColumnWidthProvider.getTableWidth(java.lang.String)
public boolean isTableAcceptingWidth(java.lang.String tableCellsTagName)
AuthorTableColumnWidthProvider
width
attribute the method will return false
.
isTableAcceptingWidth
in interface AuthorTableColumnWidthProvider
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.AuthorTableColumnWidthProvider.isTableAcceptingWidth(java.lang.String)
public boolean isTableAndColumnsResizable(java.lang.String tableCellsTagName)
AuthorTableColumnWidthProvider
true
only if the given table cells tag name is equal to 'entry'
.
isTableAndColumnsResizable
in interface AuthorTableColumnWidthProvider
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.AuthorTableColumnWidthProvider.isTableAndColumnsResizable(java.lang.String)
public boolean isAcceptingFixedColumnWidths(java.lang.String tableCellsTagName)
AuthorTableColumnWidthProvider
isAcceptingFixedColumnWidths
in interface AuthorTableColumnWidthProvider
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.AuthorTableColumnWidthProvider.isAcceptingFixedColumnWidths(java.lang.String)
public boolean isAcceptingPercentageColumnWidths(java.lang.String tableCellsTagName)
AuthorTableColumnWidthProvider
isAcceptingPercentageColumnWidths
in interface AuthorTableColumnWidthProvider
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.AuthorTableColumnWidthProvider.isAcceptingPercentageColumnWidths(java.lang.String)
public boolean isAcceptingProportionalColumnWidths(java.lang.String tableCellsTagName)
AuthorTableColumnWidthProvider
isAcceptingProportionalColumnWidths
in interface AuthorTableColumnWidthProvider
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.AuthorTableColumnWidthProvider.isAcceptingProportionalColumnWidths(java.lang.String)
|
Oxygen XML Editor 14.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |