当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
HighlightsChangeEvent (Editor Library 2) - NetBeans API Javadoc (Current Development Version)
org.netbeans.spi.editor.highlighting
Class HighlightsChangeEvent
java.lang.Object
java.util.EventObject
org.netbeans.spi.editor.highlighting.HighlightsChangeEvent
- All Implemented Interfaces:
- Serializable
public final class HighlightsChangeEvent
- extends EventObject
An event object notifying about a change in highlighting of certain area
of a document. The area where the highlighting has changed is specified by
its starting and ending offsets. Whoever receives this event should consider
re-requesting the new list of highlighted areas from the
HighlightsContainer that fired the event.
- See Also:
- Serialized Form
|
Method Summary |
int |
getEndOffset()
Gets the end of an area in the document where highlighting has
changed. |
int |
getStartOffset()
Gets the beginning of an area in the document where highlighting has
changed. |
HighlightsChangeEvent
public HighlightsChangeEvent(HighlightsContainer source,
int startOffset,
int endOffset)
- Creates a new instance of
HighlightsChangeEvent. The
startOffset and endOffset parameters specify
the area of a document where highlighting has changed. It's possible to
use Integer.MAX_VALUE for the endOffset parameter
meaning that the end of the change is unknown or the change spans up to
the end of a document.
- Parameters:
source - The highlight layer that fired this event.startOffset - The beginning of the area that has changed.endOffset - The end of the changed area.
getStartOffset
public int getStartOffset()
- Gets the beginning of an area in the document where highlighting has
changed.
- Returns:
- The starting offset of the chaged area. Should always be greater than
or equal to zero.
getEndOffset
public int getEndOffset()
- Gets the end of an area in the document where highlighting has
changed.
- Returns:
- The ending offset of the chaged area. May return
Integer.MAX_VALUE
if the ending position is unknown.