Package ro.sync.ecss.extensions.dita.map
Class DITAMapAuthorTableOperationsHandler
java.lang.Object
ro.sync.ecss.extensions.api.table.operations.AuthorTableOperationsHandler
ro.sync.ecss.extensions.dita.map.DITAMapAuthorTableOperationsHandler
@API(type=INTERNAL,
src=PUBLIC)
public class DITAMapAuthorTableOperationsHandler
extends AuthorTableOperationsHandler
Author table operations handler for DITAMap framework.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetTableElementContainingOffset(AuthorAccess access, int offset) Returns the element representing the table that contains the given offset.booleanHandles delete column operation.booleanhandleDeleteRow(AuthorTableDeleteRowArguments arguments) Handles delete row operation.booleanhandleDeleteRows(AuthorTableDeleteRowsArguments arguments) Handles delete rows operation.booleanhandleInsertColumn(AuthorTableInsertColumnArguments tablePasteColumnArgs) Handles insert column operation.Methods inherited from class ro.sync.ecss.extensions.api.table.operations.AuthorTableOperationsHandler
getColumnSpecification, handleAttributeChange, handleCreateTable, handlePasteRows, handleRemoveInvalidColNamesFromTableCells
-
Constructor Details
-
DITAMapAuthorTableOperationsHandler
public DITAMapAuthorTableOperationsHandler()
-
-
Method Details
-
handleInsertColumn
public boolean handleInsertColumn(AuthorTableInsertColumnArguments tablePasteColumnArgs) throws AuthorOperationException Description copied from class:AuthorTableOperationsHandlerHandles insert column operation.
This method is called when pasting or dropping content for which theSelectionInterpretationMode.TABLE_COLUMNinterpretation mode was imposed.
TheSelectionInterpretationMode.TABLE_COLUMNinterpretation mode is already set by default by the application when a table column is selected. It can be also imposed from theAuthorSelectionModel.setSelectionInterpretationMode(SelectionInterpretationMode)method, for any selection content.
For instance, when two paragraphs are copied, the clipboard object contains a list with two Author document fragments (one for each paragraph). If the selection interpretation mode is imposed toSelectionInterpretationMode.TABLE_COLUMN, when pasting the fragments this method is called. The fragments array are included in the argument object.- Overrides:
handleInsertColumnin classAuthorTableOperationsHandler- Parameters:
tablePasteColumnArgs- The arguments for insert column operation like: the offset where the column is inserted, the array containing the cells fragments that compose an Author table column, information about column width specification, the Author access.- Returns:
trueif the insert column operation succeeds.- Throws:
AuthorOperationException- An insert column operation exception. If theAuthorOperationException.isOperationRejectedOnPurpose()method of this exception returns true, the exception is presented to the user.- See Also:
-
handleDeleteColumn
public boolean handleDeleteColumn(AuthorTableDeleteColumnArguments arguments) throws AuthorOperationException Description copied from class:AuthorTableOperationsHandlerHandles delete column operation.
This method is called when deleting content (by drag and drop or cut operations) for which theSelectionInterpretationMode.TABLE_COLUMNinterpretation mode was imposed.
TheSelectionInterpretationMode.TABLE_COLUMNinterpretation mode is already set by default by the application when a table column is selected. It can be also imposed from theAuthorSelectionModel.setSelectionInterpretationMode(SelectionInterpretationMode)method, for any selection content.
For instance, when two paragraphs are copied, the clipboard object contains a list with two Author document fragments (one for each paragraph). If the selection interpretation mode is imposed toSelectionInterpretationMode.TABLE_COLUMN, when deleting the fragments this method is called. The fragments array are included in the argument object.- Overrides:
handleDeleteColumnin classAuthorTableOperationsHandler- Parameters:
arguments- The arguments for delete column operation (like the Author access and the column cells start and end offsets).- Returns:
trueif the delete column operation succeeds.- Throws:
AuthorOperationException- A delete column operation exception. If theAuthorOperationException.isOperationRejectedOnPurpose()method of this exception returns true, the exception is presented to the user.- See Also:
-
handleDeleteRow
public boolean handleDeleteRow(AuthorTableDeleteRowArguments arguments) throws AuthorOperationException Description copied from class:AuthorTableOperationsHandlerHandles delete row operation.
This method is called when deleting content (by drag and drop or cut operations) for which theSelectionInterpretationMode.TABLE_ROWinterpretation mode was imposed.
TheSelectionInterpretationMode.TABLE_ROWinterpretation mode is already set by default by the application when a table row is selected. It can be also imposed from theAuthorSelectionModel.setSelectionInterpretationMode(SelectionInterpretationMode)method, for any selection content.
For instance, when two paragraphs are copied, the clipboard object contains a list with two Author document fragments (one for each paragraph). If the selection interpretation mode is imposed toSelectionInterpretationMode.TABLE_ROW, when deleting the fragments this method is called. The fragments array are included in the argument object.- Overrides:
handleDeleteRowin classAuthorTableOperationsHandler- Parameters:
arguments- The arguments for delete row operation (like the Author access and the content interval of the row element that must be deleted).- Returns:
trueif the delete row operation succeeds.- Throws:
AuthorOperationException- A delete row operation exception. If theAuthorOperationException.isOperationRejectedOnPurpose()method of this exception returns true, the exception is presented to the user.- See Also:
-
handleDeleteRows
public boolean handleDeleteRows(AuthorTableDeleteRowsArguments arguments) throws AuthorOperationException Description copied from class:AuthorTableOperationsHandlerHandles delete rows operation. All the rows that intersects the given content intervals will be deleted.
This method is called when deleting content (by drag and drop or cut operations) for which theSelectionInterpretationMode.TABLE_ROWinterpretation mode was imposed.
TheSelectionInterpretationMode.TABLE_ROWinterpretation mode is already set by default by the application when a table row is selected. It can be also imposed from theAuthorSelectionModel.setSelectionInterpretationMode(SelectionInterpretationMode)method, for any selection content.
For instance, when two paragraphs are copied, the clipboard object contains a list with two Author document fragments (one for each paragraph). If the selection interpretation mode is imposed toSelectionInterpretationMode.TABLE_ROW, when deleting the fragments this method is called.- Overrides:
handleDeleteRowsin classAuthorTableOperationsHandler- Parameters:
arguments- The arguments for delete rows operation (like the Author access and the content intervals that determine the rows element that must be deleted).- Returns:
trueif the delete rows operation succeeds.- Throws:
AuthorOperationException- A delete row operation exception. If theAuthorOperationException.isOperationRejectedOnPurpose()method of this exception returns true, the exception is presented to the user.- See Also:
-
getTableElementContainingOffset
Description copied from class:AuthorTableOperationsHandlerReturns the element representing the table that contains the given offset. This method can be used to obtain the closest table that contains the given offset.- Overrides:
getTableElementContainingOffsetin classAuthorTableOperationsHandler- Parameters:
access- Access to Author operations.offset- The offset to search the parent table element for.- Returns:
- The table node that contains the given offset.
- See Also:
-