|
Oxygen XML Editor 14.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@API(type=NOT_EXTENDABLE, src=PUBLIC) public interface AuthorDocumentFilterBypass
Used as a way to circumvent calling back into the AuthorDocumentController
to
change the AuthorDocument
.
Method Summary | |
---|---|
boolean |
delete(int startOffset,
int endOffset,
boolean withBackspace)
Deletes a document fragment between the start and end offset. |
boolean |
deleteNode(AuthorNode node)
Deletes the specified node from the document. |
void |
insertFragment(int offset,
AuthorDocumentFragment frag)
Insert an AuthorDocumentFragment at the given offset. |
void |
insertMultipleElements(AuthorElement parentElement,
java.lang.String[] elementNames,
int[] offsets,
java.lang.String namespace)
Insert multiple elements at the given offsets. |
boolean |
insertMultipleFragments(AuthorElement parentElement,
AuthorDocumentFragment[] fragments,
int[] offsets)
Insert multiple fragments at the given offsets. |
boolean |
insertNode(int offset,
AuthorNode node)
Insert the specified node at the given offset. |
void |
insertText(int offset,
java.lang.String text)
Inserts a text at the given offset. |
void |
multipleDelete(AuthorElement parentElement,
int[] startOffsets,
int[] endOffsets)
Deletes the given intervals. |
void |
removeAttribute(java.lang.String attributeName,
AuthorElement element)
Removes an attribute from the given element. |
void |
renameElement(AuthorElement element,
java.lang.String newName,
java.lang.Object infoProvider)
Rename the given element. |
void |
setAttribute(java.lang.String attributeName,
AttrValue value,
AuthorElement element)
Sets the value of an attribute in the specified element. |
void |
setDoctype(AuthorDocumentType docType)
Set a new internal document type to the Author content. |
boolean |
split(AuthorNode toSplit,
int splitOffset)
Splits the specified node at the given offset. |
void |
surroundInFragment(AuthorDocumentFragment xmlFragment,
int startOffset,
int endOffset)
Surround the content between the given offsets with the xmlFragment . |
void |
surroundInFragment(java.lang.String xmlFragment,
int startOffset,
int endOffset)
Surround the content between the given offsets with the xmlFragment . |
void |
surroundInText(java.lang.String header,
java.lang.String footer,
int startOffset,
int endOffset)
Surround the content between the given offsets with plain text fragments(without XML parsing). |
void |
surroundWithNode(AuthorNode node,
int startOffset,
int endOffset,
boolean leftToRight)
Surrounds the fragment between the specified offset with the specified node. |
Method Detail |
---|
void insertText(int offset, java.lang.String text)
offset
- The insert position, 0 based.text
- The text to be inserted.void insertFragment(int offset, AuthorDocumentFragment frag)
AuthorDocumentFragment
at the given offset.
offset
- The offset where the fragment will be inserted, 0 based.frag
- The AuthorDocumentFragment
to be inserted.boolean insertNode(int offset, AuthorNode node)
offset
- The offset where the node will be inserted. 0 based.node
- The AuthorNode
to insert.
true
if the operation was successful.void insertMultipleElements(AuthorElement parentElement, java.lang.String[] elementNames, int[] offsets, java.lang.String namespace)
parentElement
- The parent element that contains all the new inserted
elements.elementNames
- The element names to be inserted.offsets
- The absolute offsets where the elements will be inserted. 0 based.namespace
- The namespace of the new inserted elements.boolean insertMultipleFragments(AuthorElement parentElement, AuthorDocumentFragment[] fragments, int[] offsets)
parentElement
- The parent element that contains all the new inserted
elements.fragments
- The fragments to be inserted.offsets
- The absolute offsets where the elements will be inserted. 0 based.
true
if the operation succeed.Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
boolean delete(int startOffset, int endOffset, boolean withBackspace)
startOffset
- Start offset, 0 based and inclusive.endOffset
- End offset, 0 based and inclusive.withBackspace
- true
if BACKSPACE
key was used when deleting the fragment.
true
if the delete operation was successful.boolean deleteNode(AuthorNode node)
node
- The AuthorNode
to delete.
true
if the delete node operation was successful.void multipleDelete(AuthorElement parentElement, int[] startOffsets, int[] endOffsets)
parentElement
- The element that contains all the deleted intervals.startOffsets
- The start offset for each interval.
Must be in document order. 0 based and inclusive.endOffsets
- The end offset for each interval.
Must be in document order. 0 based and inclusive.void renameElement(AuthorElement element, java.lang.String newName, java.lang.Object infoProvider)
element
- The AuthorElement
that is renamed.newName
- The new name for the element.infoProvider
- Information provider used for internal processing.void setAttribute(java.lang.String attributeName, AttrValue value, AuthorElement element)
AuthorElement.setAttribute(String, AttrValue)
directly)
will be subject to undo/redo.
attributeName
- Name of the attribute being changed.value
- New AttrValue
for the attribute. If null
, the attribute is
removed from the element.element
- The AuthorElement
whose attribute is changing.void removeAttribute(java.lang.String attributeName, AuthorElement element)
AuthorElement.setAttribute(String, AttrValue)
directly) will
be subject to undo/redo.
attributeName
- Name of the attribute to remove.element
- The AuthorElement
whose attribute will be removed.boolean split(AuthorNode toSplit, int splitOffset)
UniqueAttributesRecognizer
.
toSplit
- The AuthorNode
to split.splitOffset
- The split offset. The offset must be greater or equal
to 1 and less than the current document length.
true
if the node was split.void surroundWithNode(AuthorNode node, int startOffset, int endOffset, boolean leftToRight)
node
- The AuthorNode
that will surround the fragment.startOffset
- Start offset of the surrounded fragment. 0 based and inclusive.endOffset
- End offset of the surrounded fragment. 0 based and inclusive.leftToRight
- true
if after the operation the selection
in the author page is done from the left to the right.void surroundInFragment(java.lang.String xmlFragment, int startOffset, int endOffset) throws AuthorOperationException
xmlFragment
.
If endOffset < startOffset
the xmlFragment
will be inserted at startOffset
.
xmlFragment
- The XML fragment which will surround the given interval.
The first leaf node of the XML fragment will be the parent of the surrounded content.startOffset
- The start offset of the content to be surrounded, 0 based and inclusive.endOffset
- The end offset of the content to be surrounded, 0 based and inclusive.
AuthorOperationException
- If the content between start and end offset could not be surrounded.void surroundInText(java.lang.String header, java.lang.String footer, int startOffset, int endOffset) throws AuthorOperationException
header
at startOffset
and
the footer
at endOffset
.
header
- The header to be inserted before the surrounded text.footer
- The footer to be inserted after the surrounded text.startOffset
- The start offset of the text to be surrounded, 0 based and inclusive.endOffset
- The end offset of the text to be surrounded, 0 based and inclusive.
AuthorOperationException
- If the operation failed.void setDoctype(AuthorDocumentType docType)
docType
- The document type information.void surroundInFragment(AuthorDocumentFragment xmlFragment, int startOffset, int endOffset) throws AuthorOperationException
xmlFragment
.
If endOffset < startOffset
the xmlFragment
will be inserted at startOffset
.
xmlFragment
- The XML fragment which will surround the given interval.
The first leaf node of the XML fragment will be the parent of the surrounded content.startOffset
- The start offset of the content to be surrounded, 0 based and inclusive.endOffset
- The end offset of the content to be surrounded, 0 based and inclusive.
AuthorOperationException
|
Oxygen XML Editor 14.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |