Oxygen XML Editor 14.2 Author API

ro.sync.ecss.extensions.api.highlights
Interface AuthorHighlighter


@API(type=NOT_EXTENDABLE,
     src=PUBLIC)
public interface AuthorHighlighter

The highlighter which will be available to users to add, remove and check highlights


Method Summary
 Highlight addHighlight(int startOffset, int endOffset, HighlightPainter painter, java.lang.Object additionalData)
          Adds a highlight to the view.
 Highlight[] getHighlights()
          Fetches the current list of highlights.
 void removeAllHighlights()
          Removes all highlights this highlighter is responsible for.
 void removeHighlight(Highlight highlight)
          Removes a highlight from the view.
 

Method Detail

addHighlight

Highlight addHighlight(int startOffset,
                       int endOffset,
                       HighlightPainter painter,
                       java.lang.Object additionalData)
                       throws javax.swing.text.BadLocationException
Adds a highlight to the view. Returns a tag that can be used to refer to the highlight.

Parameters:
startOffset - the beginning of the range >= 0
endOffset - the inclusive end of the range >= startOffset
painter - the painter to use for the actual highlighting
additionalData - The additional data which can be stored in the highlight. May be null.
Returns:
an object that refers to the highlight
Throws:
javax.swing.text.BadLocationException - for an invalid range specification

removeHighlight

void removeHighlight(Highlight highlight)
Removes a highlight from the view.

Parameters:
highlight - which highlight to remove

removeAllHighlights

void removeAllHighlights()
Removes all highlights this highlighter is responsible for.


getHighlights

Highlight[] getHighlights()
Fetches the current list of highlights.

Returns:
the highlight list

Oxygen XML Editor 14.2 Author API

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