public static interface NbDocument.Annotatable extends Document
StreamDescriptionProperty, TitleProperty
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(Position startPos,
int length,
Annotation annotation)
Add annotation to the document.
|
void |
removeAnnotation(Annotation annotation)
Removal of added annotation.
|
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeDocumentListener, removeUndoableEditListener, render
void addAnnotation(Position startPos, int length, Annotation annotation)
startPos
- position which represent begining
of the annotated textlength
- length of the annotated text. If -1 is specified
the whole line will be annotatedannotation
- annotation which is attached to this textvoid removeAnnotation(Annotation annotation)
annotation
- annotation which is going to be removed