Class AnnotationPainter.NullStrategy

All Implemented Interfaces:
Enclosing class:

public static final class AnnotationPainter.NullStrategy extends Object implements AnnotationPainter.IDrawingStrategy
Drawing strategy that does nothing.
  • Constructor Details

    • NullStrategy

      public NullStrategy()
  • Method Details

    • draw

      public void draw(Annotation annotation, GC gc, StyledText textWidget, int offset, int length, Color color)
      Description copied from interface: AnnotationPainter.IDrawingStrategy
      Draws a decoration for an annotation onto the specified GC at the given text range. There are two different invocation modes of the draw method:
      • drawing mode: the passed GC is the graphics context of a paint event occurring on the text widget. The strategy should draw the decoration onto the graphics context, such that the decoration appears at the given range in the text widget.
      • clearing mode: the passed GC is null. In this case the strategy must invalidate enough of the text widget's client area to cover any decoration drawn in drawing mode. This can usually be accomplished by calling textWidget.redrawRange(offset, length, true).
      Specified by:
      draw in interface AnnotationPainter.IDrawingStrategy
      annotation - the annotation to be drawn
      gc - the graphics context, null when in clearing mode
      textWidget - the text widget to draw on
      offset - the offset of the line
      length - the length of the line
      color - the color of the line