|
Oxygen XML Editor 12.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.operations.AbstractTableOperation
public abstract class AbstractTableOperation
Base class for table operations.
Field Summary | |
---|---|
protected AuthorTableHelper |
tableHelper
Table helper, has methods specific to each document type. |
Fields inherited from interface ro.sync.ecss.extensions.api.AuthorOperation |
---|
NAMESPACE_ARGUMENT, NAMESPACE_ARGUMENT_DESCRIPTOR, SCHEMA_AWARE_ARGUMENT, SCHEMA_AWARE_ARGUMENT_DESCRIPTOR |
Constructor Summary | |
---|---|
AbstractTableOperation(AuthorTableHelper authorTableHelper)
Constructor. |
Method Summary | |
---|---|
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 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ro.sync.ecss.extensions.api.AuthorOperation |
---|
doOperation, getArguments |
Methods inherited from interface ro.sync.ecss.extensions.api.Extension |
---|
getDescription |
Field Detail |
---|
protected AuthorTableHelper tableHelper
Constructor Detail |
---|
public AbstractTableOperation(AuthorTableHelper authorTableHelper)
authorTableHelper
- Table helper, has methods specific to each document type.Method Detail |
---|
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.
|
Oxygen XML Editor 12.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |