@API(type=INTERNAL,
src=PUBLIC)
public abstract class AbstractTableOperation
extends java.lang.Object
implements AuthorOperation
| Modifier and Type | Field and Description |
|---|---|
static ArgumentDescriptor |
TABLE_INFO_ARGUMENT_DESCRIPTOR
Argument descriptor for a table info argument.
|
static java.lang.String |
TABLE_INFO_ARGUMENT_NAME
The name of the table info argument.
|
protected AuthorTableHelper |
tableHelper
Table helper, has methods specific to each document type.
|
NAMESPACE_ARGUMENT, NAMESPACE_ARGUMENT_DESCRIPTOR, SCHEMA_AWARE_ARGUMENT, SCHEMA_AWARE_ARGUMENT_DESCRIPTOR| Constructor and Description |
|---|
AbstractTableOperation(AuthorTableHelper authorTableHelper)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected AuthorDocumentFragment |
createEmptyCell(AuthorAccess authorAccess,
AuthorElement cell,
java.lang.String[] skippedAttributes)
Create an
AuthorDocumentFragment representing an empty cell by duplicating
the given cell without its content and skipping the specified attributes. |
protected int |
findCellInsertionOffset(AuthorAccess authorAccess,
AuthorElement tableElement,
int row,
int column)
Find the offset in the document where a new entry (table cell) should be inserted
for the given table row and column.
|
protected AuthorElement |
getElementAncestor(AuthorNode node,
int type)
Search for an ancestor
AuthorNode with the specified type. |
protected boolean |
isElement(AuthorNode node,
java.lang.String elemLocalName)
Test if a given
AuthorNode is an element and has the a specific local name. |
protected boolean |
isTableElement(AuthorNode node,
int type)
Test if an
AuthorNode is an element and it has one of the following types:
AuthorTableHelper.TYPE_CELL, AuthorTableHelper.TYPE_ROW or
AuthorTableHelper.TYPE_TABLE. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdoOperation, getArgumentsgetDescriptionpublic static final java.lang.String TABLE_INFO_ARGUMENT_NAME
public static final ArgumentDescriptor TABLE_INFO_ARGUMENT_DESCRIPTOR
protected AuthorTableHelper tableHelper
public AbstractTableOperation(AuthorTableHelper authorTableHelper)
authorTableHelper - Table helper, has methods specific to each document type.protected AuthorElement getElementAncestor(AuthorNode node, int type)
AuthorNode with the specified type.node - The starting node.type - The type of the ancestor.node or the node
itself if the type matches.protected boolean isElement(AuthorNode node, java.lang.String elemLocalName)
AuthorNode is an element and has the a specific local name.node - The AuthorNode to be checked.elemLocalName - The local name of the element.true if the given AuthorNode is an
element and its local name matches the given string.protected boolean isTableElement(AuthorNode node, int type)
AuthorNode is an element and it has one of the following types:
AuthorTableHelper.TYPE_CELL, AuthorTableHelper.TYPE_ROW or
AuthorTableHelper.TYPE_TABLE.node - The node to be checked.type - The type to search for.true if the node is an element with the specified type.protected int findCellInsertionOffset(AuthorAccess authorAccess, AuthorElement tableElement, int row, int column)
authorAccess - The author access.
Provides access to specific informations and actions for
editor, document, workspace, tables, change tracking, utilitytableElement - The element rendered as a table. Its 'display' CSS property
is set to 'table'.row - The table row where the insertion will occur, 0 based.column - The column where the insertion will occur, 0 based.protected AuthorDocumentFragment createEmptyCell(AuthorAccess authorAccess, AuthorElement cell, java.lang.String[] skippedAttributes) throws javax.swing.text.BadLocationException
AuthorDocumentFragment representing an empty cell by duplicating
the given cell without its content and skipping the specified attributes.authorAccess - The author access.
Provides access to specific informations and actions for
editor, document, workspace, tables, change tracking, utilitycell - The reference cell.skippedAttributes - The attributes which should not be copied.javax.swing.text.BadLocationException - When the fragment cannot be created.© Copyright SyncRO Soft SRL 2002 - 2015. All rights reserved.