Oxygen XML Editor 14.2 Author API

ro.sync.ecss.extensions.dita.map
Class DITAMapAuthorTableOperationsHandler

java.lang.Object
  extended by ro.sync.ecss.extensions.api.table.operations.AuthorTableOperationsHandler
      extended by ro.sync.ecss.extensions.dita.map.DITAMapAuthorTableOperationsHandler

public class DITAMapAuthorTableOperationsHandler
extends AuthorTableOperationsHandler

Author table operations handler for DITAMap framework.


Constructor Summary
DITAMapAuthorTableOperationsHandler()
           
 
Method Summary
 AuthorElement getTableElementContainingOffset(AuthorAccess access, int offset)
          Returns the element representing the table that contains the given offset.
 boolean handleDeleteColumn(AuthorTableDeleteColumnArguments arguments)
          Handles delete column operation.
 boolean handleDeleteRow(AuthorTableDeleteRowArguments arguments)
          Handles delete row operation.
 boolean handleInsertColumn(AuthorTableInsertColumnArguments tablePasteColumnArgs)
          Handles insert column operation.
 
Methods inherited from class ro.sync.ecss.extensions.api.table.operations.AuthorTableOperationsHandler
getColumnSpecification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DITAMapAuthorTableOperationsHandler

public DITAMapAuthorTableOperationsHandler()
Method Detail

handleInsertColumn

public boolean handleInsertColumn(AuthorTableInsertColumnArguments tablePasteColumnArgs)
                           throws AuthorOperationException
Description copied from class: AuthorTableOperationsHandler
Handles insert column operation.
This method is called when pasting or dropping content for which the SelectionInterpretationMode.TABLE_COLUMN interpretation mode was imposed.

The SelectionInterpretationMode.TABLE_COLUMN interpretation mode is already set by default by the application when a table column is selected. It can be also imposed from the AuthorSelectionModel.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 to SelectionInterpretationMode.TABLE_COLUMN, when pasting the fragments this method is called. The fragments array are included in the argument object.

Overrides:
handleInsertColumn in class AuthorTableOperationsHandler
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:
true if the insert column operation succeeds.
Throws:
AuthorOperationException - An insert column operation exception. If the AuthorOperationException.isOperationRejectedOnPurpose() method of this exception returns true, the exception is presented to the user.
See Also:
AuthorTableOperationsHandler.handleInsertColumn(ro.sync.ecss.extensions.api.table.operations.AuthorTableInsertColumnArguments)

handleDeleteColumn

public boolean handleDeleteColumn(AuthorTableDeleteColumnArguments arguments)
                           throws AuthorOperationException
Description copied from class: AuthorTableOperationsHandler
Handles delete column operation.
This method is called when deleting content (by drag and drop or cut operations) for which the SelectionInterpretationMode.TABLE_COLUMN interpretation mode was imposed.

The SelectionInterpretationMode.TABLE_COLUMN interpretation mode is already set by default by the application when a table column is selected. It can be also imposed from the AuthorSelectionModel.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 to SelectionInterpretationMode.TABLE_COLUMN, when deleting the fragments this method is called. The fragments array are included in the argument object.

Overrides:
handleDeleteColumn in class AuthorTableOperationsHandler
Parameters:
arguments - The arguments for delete column operation (like the Author access and the column cells start and end offsets).
Returns:
true if the delete column operation succeeds.
Throws:
AuthorOperationException - A delete column operation exception. If the AuthorOperationException.isOperationRejectedOnPurpose() method of this exception returns true, the exception is presented to the user.
See Also:
AuthorTableOperationsHandler.handleDeleteColumn(ro.sync.ecss.extensions.api.table.operations.AuthorTableDeleteColumnArguments)

handleDeleteRow

public boolean handleDeleteRow(AuthorTableDeleteRowArguments arguments)
                        throws AuthorOperationException
Description copied from class: AuthorTableOperationsHandler
Handles delete row operation.
This method is called when deleting content (by drag and drop or cut operations) for which the SelectionInterpretationMode.TABLE_ROW interpretation mode was imposed.

The SelectionInterpretationMode.TABLE_ROW interpretation mode is already set by default by the application when a table row is selected. It can be also imposed from the AuthorSelectionModel.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 to SelectionInterpretationMode.TABLE_ROW, when deleting the fragments this method is called. The fragments array are included in the argument object.

Overrides:
handleDeleteRow in class AuthorTableOperationsHandler
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:
true if the delete row operation succeeds.
Throws:
AuthorOperationException - A delete row operation exception. If the AuthorOperationException.isOperationRejectedOnPurpose() method of this exception returns true, the exception is presented to the user.
See Also:
AuthorTableOperationsHandler.handleDeleteRow(ro.sync.ecss.extensions.api.table.operations.AuthorTableDeleteRowArguments)

getTableElementContainingOffset

public AuthorElement getTableElementContainingOffset(AuthorAccess access,
                                                     int offset)
Description copied from class: AuthorTableOperationsHandler
Returns 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:
getTableElementContainingOffset in class AuthorTableOperationsHandler
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:
AuthorTableOperationsHandler.getTableElementContainingOffset(ro.sync.ecss.extensions.api.AuthorAccess, int)

Oxygen XML Editor 14.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2013. All rights reserved.