|
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 WSAuthorEditorPageBase
Provides access to methods related to the Author editor actions and information.
Method Summary | |
---|---|
void |
addAuthorAttributesDisplayFilter(AuthorAttributesDisplayFilter attributesDisplayFilter)
Adds a filter for displaying attributes to the current author page. |
void |
addAuthorCaretListener(AuthorCaretListener caretListener)
Adds a caret listener to the Author page. |
void |
addAuthorMouseListener(AuthorMouseListener mouseListener)
Adds a mouse listener to the current author page. |
void |
addPopUpMenuCustomizer(AuthorPopupMenuCustomizer popUpCustomizer)
Add the pop-up menu customizer which can be used to customize the pop-up menu (add/remove actions) before showing it in the Author page. |
void |
deleteSelection()
Delete the current selected text, if any. |
void |
editAttribute(AuthorElement targetElement,
java.lang.String attributeName)
Searches through the in-place editors added on the given element for the first one that edits the given attribute. |
AuthorActionsProvider |
getActionsProvider()
Provides access to actions already defined in the Author page like: Undo, Redo, Display Full Tags, Edit Attributes, etc. |
java.lang.Object |
getAuthorComponent()
Get the internal component on which the Author page is rendered. |
AuthorSelectionModel |
getAuthorSelectionModel()
Get the Author selection model containing access to all Author selection intervals and methods for adding simple and multiple selections. |
int |
getBalancedSelectionEnd()
Usually returns the same value as getSelectionEnd() . |
int |
getBalancedSelectionStart()
Usually returns the same value as getSelectionStart() . |
AuthorSchemaAwareEditingHandler |
getDefaultAuthorSchemaAwareEditingHandler()
Get the default schema aware editing handler. |
AuthorNode |
getFullySelectedNode()
Get the node which is fully and perfectly surrounded by the current selection in the Author editor. If the selection surrounds perfectly the node (the selection starts at the node start offset and ends immediately after the node end offset), the node will be returned, otherwise null will be returned.For example if a node is selected using Outline or the Breadcrumb, the method will return the corresponding node. |
AuthorHighlighter |
getHighlighter()
Get the highlighter which can be used to add/remove/manage the custom user highlights |
AuthorPersistentHighlighter |
getPersistentHighlighter()
Get the persistent highlighter which can be used to add/remove/manage the custom persistent user highlights. |
java.lang.String |
getSelectedText()
Get the current selected text. |
int |
getSelectionEnd()
Get end offset of the current selection. |
int |
getSelectionStart()
Get start offset of the current selection. |
Styles |
getStyles(AuthorNode node)
Get the CSS styles which are used to render a particular Author node. |
void |
goToNextEditablePosition(int startOffset,
int endOffset)
Identifies and goes to the next edit position. |
boolean |
hasSelection()
Check if the editor page has a selection Use AuthorSelectionModel to get more information and access to the Author
editor page selection. |
void |
refresh()
Reload the CSS files and perform a refresh on the whole document to recompute the layout and the styles for all the nodes based on the new CSS files content. |
void |
refresh(AuthorNode authorNode)
Refresh the rendering layout and CSS styles for this node and all its contents. |
void |
removeAuthorAttributesDisplayFilter(AuthorAttributesDisplayFilter attributesDisplayFilter)
Remove a filter for displaying attributes to the current author page. |
void |
removeAuthorCaretListener(AuthorCaretListener caretListener)
Removes the specified caret listener from the Author page. |
void |
removeAuthorMouseListener(AuthorMouseListener mouseListener)
Removes the specified mouse listener from the current author page. |
void |
removePopUpMenuCustomizer(AuthorPopupMenuCustomizer popUpCustomizer)
Add the pop-up menu customizer which can be used to customize the pop-up menu (add/remove actions) before showing it in the Author page. |
void |
scrollToRectangle(Rectangle rectangle)
Scroll the Author viewport to a specific rectangle. |
void |
select(int startOffset,
int endOffset)
Select the interval between start and end offset. |
void |
setPopUpMenuCustomizer(AuthorPopupMenuCustomizer popUpCustomizer)
Deprecated. This method removes all pop-up menu customizers already registered, please use the "addPopUpMenuCustomizer" method instead. |
AuthorViewToModelInfo |
viewToModel(int x,
int y)
Get the position in the document corresponding to the point in the author viewport component. |
Methods inherited from interface ro.sync.exml.workspace.api.editor.page.WSTextBasedEditorPage |
---|
getCaretOffset, getLocationOnScreenAsPoint, getLocationRelativeToEditorFromScreen, getStartEndOffsets, getWordAtCaret, isEditable, modelToViewRectangle, selectWord, setCaretPosition, setEditable, viewToModelOffset |
Method Detail |
---|
AuthorViewToModelInfo viewToModel(int x, int y)
x
- The "x" coordinate relative to the viewport origin.y
- The "y" coordinate relative to the viewport origin.
AuthorViewToModelInfo
containing the offset and the node
at offset corresponding to the given point. The method does not return null
,
instead an undefined view to model info object is returned if a valid one could not be determined.@Deprecated void setPopUpMenuCustomizer(AuthorPopupMenuCustomizer popUpCustomizer)
popUpCustomizer
- the pop-up menu customizer.void addPopUpMenuCustomizer(AuthorPopupMenuCustomizer popUpCustomizer)
popUpCustomizer
- the pop-up menu customizer.
If the customizer is already added, it will not be added again.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.
void removePopUpMenuCustomizer(AuthorPopupMenuCustomizer popUpCustomizer)
popUpCustomizer
- the pop-up menu customizer.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.
void addAuthorMouseListener(AuthorMouseListener mouseListener)
mouseListener
- The AuthorMouseListener
to be added.void removeAuthorMouseListener(AuthorMouseListener mouseListener)
mouseListener
- The AuthorMouseListener
to be removed.void addAuthorCaretListener(AuthorCaretListener caretListener)
caretListener
- The AuthorCaretListener
to be added.void removeAuthorCaretListener(AuthorCaretListener caretListener)
caretListener
- The AuthorCaretListener
to be removed.void refresh(AuthorNode authorNode)
authorNode
- The node for which the layout and styles will be recomputed.void refresh()
AuthorHighlighter getHighlighter()
AuthorPersistentHighlighter getPersistentHighlighter()
<?oxy_custom_start prop1="val1"....?> xml content <?oxy_custom_end?>
int getBalancedSelectionStart()
getSelectionStart()
.
int getBalancedSelectionEnd()
getSelectionEnd()
.
AuthorSchemaAwareEditingHandler getDefaultAuthorSchemaAwareEditingHandler()
AuthorActionsProvider getActionsProvider()
java.lang.Object getAuthorComponent()
Styles getStyles(AuthorNode node)
StylesFilter
.
node
- The node for which we want to obtain the styles.
void addAuthorAttributesDisplayFilter(AuthorAttributesDisplayFilter attributesDisplayFilter)
attributesDisplayFilter
- The AuthorAttributesDisplayFilter
to be added.void removeAuthorAttributesDisplayFilter(AuthorAttributesDisplayFilter attributesDisplayFilter)
attributesDisplayFilter
- The AuthorAttributesDisplayFilter
to be added.AuthorNode getFullySelectedNode()
null
will be returned.AuthorDocumentController.getNodeAtOffset(int)
called for the caret offset always returns the parent of the selected element
as the caret is actually outside the selected element.
Thus, in order to obtain the context node, this method should be used and if it returns null
you can use the AuthorDocumentController.getNodeAtOffset(int)
method.
null
otherwise.AuthorSelectionModel getAuthorSelectionModel()
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.
int getSelectionStart()
AuthorSelectionModel
to get more information and access to the Author
editor page selection.
getSelectionStart
in interface WSTextBasedEditorPage
int getSelectionEnd()
AuthorSelectionModel
to get more information and access to the Author
editor page selection.
getSelectionEnd
in interface WSTextBasedEditorPage
java.lang.String getSelectedText()
AuthorSelectionModel
to get more information and access to the Author
editor page selection.
getSelectedText
in interface WSTextBasedEditorPage
void deleteSelection()
AuthorSelectionModel
to get more information and access to the Author
editor page selection.
deleteSelection
in interface WSTextBasedEditorPage
boolean hasSelection()
AuthorSelectionModel
to get more information and access to the Author
editor page selection.
hasSelection
in interface WSTextBasedEditorPage
true
if there is a selection, false
otherwise.void select(int startOffset, int endOffset)
AuthorSelectionModel
to get more information and access to the Author
editor page selection.
select
in interface WSTextBasedEditorPage
startOffset
- Inclusive start offsetendOffset
- Exclusive end offsetvoid goToNextEditablePosition(int startOffset, int endOffset) throws javax.swing.text.BadLocationException
startOffset
- The offset from where to start looking.endOffset
- The offset where to stop looking for.
javax.swing.text.BadLocationException
- The given offset is invalid.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.
void editAttribute(AuthorElement targetElement, java.lang.String attributeName)
targetElement
- The parent element of the attribute.attributeName
- The name of the searched attribute.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.
void scrollToRectangle(Rectangle rectangle)
WSTextBasedEditorPage.modelToViewRectangle(int)
method.
rectangle
- The rectangle to scroll to.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.
|
Oxygen XML Editor 14.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |