|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.text.source.AnnotationPainter
Paints annotations provided by an annotation model as squigglies onto an associated source viewer. Clients usually instantiate and configure objects of this class.
Fields inherited from interface org.eclipse.jface.text.IPainter |
CONFIGURATION, INTERNAL, KEY_STROKE, MOUSE_BUTTON, SELECTION, TEXT_CHANGE |
Constructor Summary | |
AnnotationPainter(ISourceViewer sourceViewer,
IAnnotationAccess access)
Creates a new annotation painter for the given source viewer and with the given annotation access. |
Method Summary | |
void |
addAnnotationType(Object annotationType)
Adds the given annotation type to the list of annotation types whose annotations should be painted by this painter. |
void |
deactivate(boolean redraw)
Deactivates this painter. |
void |
dispose()
Disposes this painter. |
boolean |
isPaintingAnnotations()
Returns whether the list of annotation types whose annotations are painted by this painter contains at least on element. |
void |
modelChanged(IAnnotationModel model)
Called if a model change occurred on the given model. |
void |
paint(int reason)
Requests this painter to repaint because of the given reason. |
void |
paintControl(PaintEvent event)
Sent when a paint event occurs for the control. |
void |
removeAllAnnotationTypes()
Clears the list of annotation types whose annotations are painted by this painter. |
void |
removeAnnotationType(Object annotationType)
Removes the given annotation type from the list of annotation types whose annotations are painted by this painter. |
void |
setAnnotationTypeColor(Object annotationType,
Color color)
Sets the color in which the squiggly for the given annotation type should be drawn. |
void |
setPositionManager(IPaintPositionManager manager)
Sets the paint position manager that can be used by this painter or removes any previously set paint position manager. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AnnotationPainter(ISourceViewer sourceViewer, IAnnotationAccess access)
sourceViewer
- the source viewer for this painteraccess
- the annotation access for this painterMethod Detail |
public void modelChanged(IAnnotationModel model)
IAnnotationModelListener
modelChanged
in interface IAnnotationModelListener
org.eclipse.jface.text.source.IAnnotationModelListener
model
- the changed annotation modelpublic void setAnnotationTypeColor(Object annotationType, Color color)
annotationType
- the annotation typecolor
- the colorpublic void addAnnotationType(Object annotationType)
annotationType
- the annotation typepublic void removeAnnotationType(Object annotationType)
annotationType
- the annotation typepublic void removeAllAnnotationTypes()
public boolean isPaintingAnnotations()
true
if there is an annotation type whose annotations are paintedpublic void dispose()
IPainter
dispose
in interface IPainter
org.eclipse.jface.text.IPainter
IPainter.deactivate(boolean)
public void paintControl(PaintEvent event)
PaintListener
paintControl
in interface PaintListener
org.eclipse.swt.events.PaintListener
e
- an event containing information about the paintpublic void deactivate(boolean redraw)
IPainter
redraw
indicates whether the painter should remove
any decoration it previously applied. A deactivated painter can be reactivated by calling
paint
.deactivate
in interface IPainter
org.eclipse.jface.text.IPainter
redraw
- true
if any previously applied decoration should be removedIPainter.paint(int)
public void paint(int reason)
IPainter
paint
in interface IPainter
org.eclipse.jface.text.IPainter
reason
- the repaint reason, value is one of the constants defined in this interfacepublic void setPositionManager(IPaintPositionManager manager)
IPainter
setPositionManager
in interface IPainter
org.eclipse.jface.text.IPainter
manager
- the paint position manager or null
|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |