站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

HighlightsChangeEvent (Editor Library 2) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.lib2/1 1.3 2

org.netbeans.spi.editor.highlighting
Class HighlightsChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by 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

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
HighlightsChangeEvent(HighlightsContainer source, int startOffset, int endOffset)
          Creates a new instance of HighlightsChangeEvent.
 
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.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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.

org.netbeans.modules.editor.lib2/1 1.3 2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.