|
Oxygen XML Editor 13.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 AuthorPersistentHighlighter
Manage the user custom persistent highlights which get serialized in the XML as processing
instructions with the form:
<?oxy_custom_start prop1="val1"....?> xml content <?oxy_custom_end?>
The Highlighter is accessible from WSAuthorEditorPageBase.getPersistentHighlighter()
.
Method Summary | |
---|---|
AuthorPersistentHighlight |
addHighlight(int startOffset,
int endOffset,
java.util.LinkedHashMap<java.lang.String,java.lang.String> properties)
Add a persistent highlight |
AuthorPersistentHighlight[] |
getHighlights()
Fetches the list of custom persistent highlights. |
void |
removeAllHighlights()
Removes all custom persistent highlights. |
void |
removeHighlight(AuthorPersistentHighlight highlight)
Removes a highlight from the view. |
void |
setHighlightRenderer(PersistentHighlightRenderer renderer)
Set a renderer for customizing the way that the custom persistent highlights are displayed. |
void |
setProperties(AuthorPersistentHighlight highlight,
java.util.LinkedHashMap<java.lang.String,java.lang.String> newProperties)
Set new properties of a specific highlight. A copy of the initial properties can be obtained from AuthorPersistentHighlight.getClonedProperties() |
Method Detail |
---|
AuthorPersistentHighlight addHighlight(int startOffset, int endOffset, java.util.LinkedHashMap<java.lang.String,java.lang.String> properties) throws java.lang.IllegalArgumentException
startOffset
- Start offsetendOffset
- End offsetproperties
- name/value pairs which will get serialized to disk.
Notes:
1. Each property name must be a valid XML attribute name.
2. Each property value will be escaped to be a valid XML attribute value.
3. In order to change the properties for a highlight you have to use the method: setProperties(AuthorPersistentHighlight, LinkedHashMap)
.
java.lang.IllegalArgumentException
- Thrown when a property name is not a valid XML attribute name.void removeHighlight(AuthorPersistentHighlight highlight)
highlight
- the highlight to removevoid removeAllHighlights()
AuthorPersistentHighlight[] getHighlights()
void setProperties(AuthorPersistentHighlight highlight, java.util.LinkedHashMap<java.lang.String,java.lang.String> newProperties) throws java.lang.IllegalArgumentException
AuthorPersistentHighlight.getClonedProperties()
highlight
- The highlight for which the properties will be set.newProperties
- The new highlight properties.
Notes:
1. Each property name must be a valid XML attribute name.
2. Each property value will be escaped to be a valid XML attribute value.
java.lang.IllegalArgumentException
- Thrown when a property name is not a valid XML attribute name.void setHighlightRenderer(PersistentHighlightRenderer renderer)
renderer
- The renderer defining the way in which the highlights are painted.
|
Oxygen XML Editor 13.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |