Class SimpleTableSortOperation
java.lang.Object
ro.sync.ecss.extensions.commons.sort.SortOperation
ro.sync.ecss.extensions.commons.sort.TableSortOperation
ro.sync.ecss.extensions.commons.sort.SimpleTableSortOperation
- All Implemented Interfaces:
AuthorOperation,Extension
- Direct Known Subclasses:
DITASimpleTableSortOperation,TEITableSortOperation
@API(type=INTERNAL,
src=PUBLIC)
public abstract class SimpleTableSortOperation
extends TableSortOperation
Sort operation for simple tables
-
Field Summary
Fields inherited from class ro.sync.ecss.extensions.commons.sort.SortOperation
authorAccess, COLUMNFields inherited from interface ro.sync.ecss.extensions.api.AuthorOperation
NAMESPACE_ARGUMENT, NAMESPACE_ARGUMENT_DESCRIPTOR, SCHEMA_AWARE_ARGUMENT, SCHEMA_AWARE_ARGUMENT_DESCRIPTOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected intReturns the visual row index of the actual table body if the table has separate head, foot element and table group elements.getSortCriteria(AuthorElement parent) Obtain the sort criterion.String[]getSortKeysValues(AuthorNode node, SortCriteriaInformation sortInfo) Obtain the values of the keys that can be used for sorting.getSortParent(int offset, AuthorAccess authorAccess) Get the table element whose rows will be sorted.booleanisCaretInColumn(AuthorAccess authorAccess, int columnNumber) Checks if the caret is in a cell which is in the given column.abstract booleanisHeadElement(AuthorElement node) Returnstrueif the given node is the table header element.booleanisIgnored(AuthorNode node) Checks if a given node is ignored when sorting.abstract booleanisRowElement(AuthorElement node) Returnstrueif the given node is a table row.abstract booleanisTableElement(AuthorElement node) Returntrueif the given node is the table element.Methods inherited from class ro.sync.ecss.extensions.commons.sort.TableSortOperation
canBeSorted, getHelpPageIDMethods inherited from class ro.sync.ecss.extensions.commons.sort.SortOperation
doOperation, getArguments, getDescription, getNonIgnoredChildren, getSelectedNonIgnoredChildrenInterval, getTextContentToSort
-
Constructor Details
-
SimpleTableSortOperation
public SimpleTableSortOperation()
-
-
Method Details
-
getSortParent
public AuthorElement getSortParent(int offset, AuthorAccess authorAccess) throws AuthorOperationException Get the table element whose rows will be sorted.- Specified by:
getSortParentin classSortOperation- Parameters:
offset- The offset where the operation was invoked.authorAccess- TheAuthorAccess.- Returns:
- The parent node of the nodes which will be sorted.
- Throws:
AuthorOperationException- See Also:
-
isIgnored
Description copied from class:SortOperationChecks if a given node is ignored when sorting.- Specified by:
isIgnoredin classSortOperation- Parameters:
node- The node to be checked.- Returns:
trueif the given node is ignored when sorting.- See Also:
-
getSortKeysValues
public String[] getSortKeysValues(AuthorNode node, SortCriteriaInformation sortInfo) throws AuthorOperationException Description copied from class:SortOperationObtain the values of the keys that can be used for sorting.- Specified by:
getSortKeysValuesin classSortOperation- Parameters:
node- The element which will be sorted.sortInfo- The sort information corresponding to the user choice.- Returns:
- an array containing the values of the keys which can be used for sorting.
- Throws:
AuthorOperationException- If the text content cannot be obtained.- See Also:
-
getSortCriteria
public List<CriterionInformation> getSortCriteria(AuthorElement parent) throws AuthorOperationException Description copied from class:SortOperationObtain the sort criterion.- Specified by:
getSortCriteriain classSortOperation- Parameters:
parent- The parent node of the nodes which will be sorted.- Returns:
- A
SortCriteriaInformationcontaining theCriterionInformationobjects. - Throws:
AuthorOperationException- See Also:
-
forceSortAll
protected boolean forceSortAll()- Overrides:
forceSortAllin classSortOperation- Returns:
trueif the sort operation should not use the selected element and should always sort all elements.- See Also:
-
isCaretInColumn
Checks if the caret is in a cell which is in the given column.- Parameters:
authorAccess- The author access.columnNumber- The number of the column in which to check.- Returns:
trueif the given column has a cell which contains the caret.
-
getRowIndexForTableBody
Description copied from class:TableSortOperationReturns the visual row index of the actual table body if the table has separate head, foot element and table group elements.- Specified by:
getRowIndexForTableBodyin classTableSortOperation- See Also:
-
isTableElement
Returntrueif the given node is the table element.- Parameters:
node- The node to be checked.- Returns:
trueif the given node is the table element.
-
isHeadElement
Returnstrueif the given node is the table header element.- Parameters:
node- The node to be checked.- Returns:
trueif the given node is the table header.
-
isRowElement
Returnstrueif the given node is a table row.- Parameters:
node- The node to be checked.- Returns:
truewhen the given node is a table row element.
-