public class AnnotationPainter extends java.lang.Object implements ITextPresentationListener
| Modifier and Type | Class and Description |
|---|---|
static interface |
AnnotationPainter.ITextStyleStrategy
A text style painting strategy draws the decoration for an annotation
onto the text widget by applying a
TextStyle on a given
StyleRange. |
| Constructor and Description |
|---|
AnnotationPainter(ISourceViewer sourceViewer,
IAnnotationAccess access)
Creates a new annotation painter for the given source viewer and with the
given annotation access.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAnnotationType(java.lang.Object annotationType,
java.lang.Object strategyID) |
void |
addTextStyleStrategy(java.lang.Object id,
AnnotationPainter.ITextStyleStrategy strategy) |
void |
applyTextPresentation(TextPresentation tp)
This method is called when a text presentation is about to be applied to
the text viewer.
|
void |
modelChanged(AnnotationModelEvent event) |
void |
modelChanged(IAnnotationModel model) |
void |
setAnnotationTypeColor(java.lang.Object annotationType,
java.lang.String color) |
public AnnotationPainter(ISourceViewer sourceViewer, IAnnotationAccess access)
sourceViewer - the source viewer for this painteraccess - the annotation access for this painterpublic void applyTextPresentation(TextPresentation tp)
ITextPresentationListenerapplyTextPresentation in interface ITextPresentationListenertp - the current text presentationpublic void modelChanged(AnnotationModelEvent event)
public void modelChanged(IAnnotationModel model)
public void addAnnotationType(java.lang.Object annotationType,
java.lang.Object strategyID)
public void setAnnotationTypeColor(java.lang.Object annotationType,
java.lang.String color)
public void addTextStyleStrategy(java.lang.Object id,
AnnotationPainter.ITextStyleStrategy strategy)