Oxygen XML Editor 11.2 Author API

ro.sync.ecss.extensions.api
Class AuthorSchemaAwareEditingHandlerAdapter

java.lang.Object
  extended by ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandlerAdapter
All Implemented Interfaces:
AuthorSchemaAwareEditingHandler
Direct Known Subclasses:
DITASchemaAwareEditingHandler, DocbookSchemaAwareEditingHandler, TEISchemaAwareEditingHandler

public class AuthorSchemaAwareEditingHandlerAdapter
extends Object
implements AuthorSchemaAwareEditingHandler

Adapter class.


Field Summary
protected  SchemaAwareHandlerResult lastHandlerResult
          Last handler result.
 
Fields inherited from interface ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandler
ACTION_ID_BACKSPACE, ACTION_ID_CUT, ACTION_ID_DELETE, ACTION_ID_DND, ACTION_ID_INSERT_FRAGMENT, ACTION_ID_PASTE, ACTION_ID_TYPING
 
Constructor Summary
AuthorSchemaAwareEditingHandlerAdapter()
           
 
Method Summary
 SchemaAwareHandlerResult getLastResult()
          Deprecated. Will be removed in a future version
 boolean handleDelete(int offset, int deleteType, AuthorAccess authorAccess, boolean wordLevel)
          Handle a keyboard delete event at the given offset (using Delete or Backspace keys).
 boolean handleDeleteElementTags(AuthorNode nodeToUnwrap, AuthorAccess authorAccess)
          Handle delete element tags event.
 boolean handleDeleteSelection(int selectionStart, int selectionEnd, int generatedByActionId, AuthorAccess authorAccess)
          Handle a delete selection event.
 boolean handleJoinElements(AuthorNode targetNode, List<AuthorNode> nodesToJoin, AuthorAccess authorAccess)
          Handle a join event between the given nodes.
 boolean handlePasteFragment(int offset, AuthorDocumentFragment[] fragmentsToInsert, int actionId, AuthorAccess authorAccess)
          Handle an insert fragment event generated by: a Paste action.
 boolean handleTyping(int offset, char ch, AuthorAccess authorAccess)
          Handle a typing event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lastHandlerResult

protected SchemaAwareHandlerResult lastHandlerResult
Last handler result.

Constructor Detail

AuthorSchemaAwareEditingHandlerAdapter

public AuthorSchemaAwareEditingHandlerAdapter()
Method Detail

handleDelete

public boolean handleDelete(int offset,
                            int deleteType,
                            AuthorAccess authorAccess,
                            boolean wordLevel)
                     throws InvalidEditException
Description copied from interface: AuthorSchemaAwareEditingHandler
Handle a keyboard delete event at the given offset (using Delete or Backspace keys).

Specified by:
handleDelete in interface AuthorSchemaAwareEditingHandler
Parameters:
offset - Offset where the delete event happened.
deleteType - ACTION_ID_DELETE if Delete key was used or ACTION_ID_BACKSPACE for Backspace.
authorAccess - Access class to the author functions.
wordLevel - true if the user requested a delete for a whole word.
Returns:
true if the event was handled.
Throws:
InvalidEditException - This is an invalid edit and must be rejected.
See Also:
AuthorSchemaAwareEditingHandler.handleDelete(int, int, ro.sync.ecss.extensions.api.AuthorAccess, boolean)

handleDeleteElementTags

public boolean handleDeleteElementTags(AuthorNode nodeToUnwrap,
                                       AuthorAccess authorAccess)
                                throws InvalidEditException
Description copied from interface: AuthorSchemaAwareEditingHandler
Handle delete element tags event. (Unwrapping)

Specified by:
handleDeleteElementTags in interface AuthorSchemaAwareEditingHandler
Parameters:
nodeToUnwrap - The node to delete element tags.
authorAccess - Access class to the author functions.
Returns:
code>true if the event was handled.
Throws:
InvalidEditException - This is an invalid edit and must be rejected.
See Also:
AuthorSchemaAwareEditingHandler.handleDeleteElementTags(ro.sync.ecss.extensions.api.node.AuthorNode, ro.sync.ecss.extensions.api.AuthorAccess)

handleDeleteSelection

public boolean handleDeleteSelection(int selectionStart,
                                     int selectionEnd,
                                     int generatedByActionId,
                                     AuthorAccess authorAccess)
                              throws InvalidEditException
Description copied from interface: AuthorSchemaAwareEditingHandler
Handle a delete selection event. The event is generated when a selection exists inside the document and one of following actions takes place:

Specified by:
handleDeleteSelection in interface AuthorSchemaAwareEditingHandler
Parameters:
selectionStart - Selection start offset.
selectionEnd - Selection end offset.
generatedByActionId - An id identifying the action that generated this event. One of the following constants are possible: ACTION_ID_TYPING, ACTION_ID_DELETE, ACTION_ID_PASTE, ACTION_ID_CUT, ACTION_ID_DND, ACTION_ID_INSERT_FRAGMENT.
authorAccess - Access class to the author functions.
Returns:
true if the event was handled.
Throws:
InvalidEditException - This is an invalid edit and must be rejected.
See Also:
AuthorSchemaAwareEditingHandler.handleDeleteSelection(int, int, int, ro.sync.ecss.extensions.api.AuthorAccess)

handleJoinElements

public boolean handleJoinElements(AuthorNode targetNode,
                                  List<AuthorNode> nodesToJoin,
                                  AuthorAccess authorAccess)
                           throws InvalidEditException
Description copied from interface: AuthorSchemaAwareEditingHandler
Handle a join event between the given nodes.

Specified by:
handleJoinElements in interface AuthorSchemaAwareEditingHandler
Parameters:
targetNode - The node where the content of the other nodes must migrate.
nodesToJoin - The nodes that must be joined in the target node.
authorAccess - Access class to the author functions.
Returns:
true if the event was handled.
Throws:
InvalidEditException - This is an invalid edit and must be rejected.
See Also:
AuthorSchemaAwareEditingHandler.handleJoinElements(ro.sync.ecss.extensions.api.node.AuthorNode, java.util.List, ro.sync.ecss.extensions.api.AuthorAccess)

handlePasteFragment

public boolean handlePasteFragment(int offset,
                                   AuthorDocumentFragment[] fragmentsToInsert,
                                   int actionId,
                                   AuthorAccess authorAccess)
                            throws InvalidEditException
Description copied from interface: AuthorSchemaAwareEditingHandler
Handle an insert fragment event generated by:

Specified by:
handlePasteFragment in interface AuthorSchemaAwareEditingHandler
Parameters:
offset - Offset where the event occurred.
fragmentsToInsert - Fragments to be inserted.
actionId - ACTION_ID_PASTE if event was generated by paste action, ACTION_ID_DND if it was generated by a DND event or ACTION_ID_INSERT_FRAGMENT if the event was generated by an AuthorDocumentController schema aware insert method.
authorAccess - Access class to the author functions.
Returns:
true if the insertion was handled.
Throws:
InvalidEditException - This is an invalid edit and must be rejected.
See Also:
AuthorSchemaAwareEditingHandler.handlePasteFragment(int, ro.sync.ecss.extensions.api.node.AuthorDocumentFragment[], int, ro.sync.ecss.extensions.api.AuthorAccess)

handleTyping

public boolean handleTyping(int offset,
                            char ch,
                            AuthorAccess authorAccess)
                     throws InvalidEditException
Description copied from interface: AuthorSchemaAwareEditingHandler
Handle a typing event.

Specified by:
handleTyping in interface AuthorSchemaAwareEditingHandler
Parameters:
offset - Offset where the typing occurred.
ch - The typed character.
authorAccess - Access class to the author functions.
Returns:
code>true if the typing was handled.
Throws:
InvalidEditException - This is an invalid edit and must be rejected.
See Also:
AuthorSchemaAwareEditingHandler.handleTyping(int, char, ro.sync.ecss.extensions.api.AuthorAccess)

getLastResult

public SchemaAwareHandlerResult getLastResult()
Deprecated. Will be removed in a future version

Returns:
The result generated by the last handler method invoked before this call. Is null if event was not handled.

Oxygen XML Editor 11.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2010.