Eclipse Platform
2.1

org.eclipse.jface.text.source
Class ProjectionAnnotation

java.lang.Object
  |
  +--org.eclipse.jface.text.source.Annotation
        |
        +--org.eclipse.jface.text.source.ProjectionAnnotation

public class ProjectionAnnotation
extends Annotation

Annotation used to represent the projection of a master document onto a ProjectionDocument. A projection annotation can be either expanded or collapsed. If expaned it corresponds to a fragment of the projection document. If collapsed, it represents a region of the master document that does not have a corresponding fragment in the projection document.

Draws itself in a tree like fashion.

This class if for internal use only.

Since:
2.1

Constructor Summary
ProjectionAnnotation(Position range)
          Creates a new projection annotation for the given range of the master document.
 
Method Summary
 boolean isFolded()
          Returns the state of this annotation.
 void paint(GC gc, Canvas canvas, Rectangle rectangle)
          Implement this method to draw a graphical representation of this annotation within the given bounds.
 void run(ITextViewer viewer)
          Toogles the state of this annotation and updates the given viewer accordingly.
 
Methods inherited from class org.eclipse.jface.text.source.Annotation
drawImage, drawImage, getLayer, setLayer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectionAnnotation

public ProjectionAnnotation(Position range)
Creates a new projection annotation for the given range of the master document.
Parameters:
range - the range.
Method Detail

paint

public void paint(GC gc,
                  Canvas canvas,
                  Rectangle rectangle)
Description copied from class: Annotation
Implement this method to draw a graphical representation of this annotation within the given bounds.
Overrides:
paint in class Annotation
Following copied from class: org.eclipse.jface.text.source.Annotation
Parameters:
GC - the drawing GC
canvas - the canvas to draw on
bounds - the bounds inside the canvas to draw on

run

public void run(ITextViewer viewer)
Toogles the state of this annotation and updates the given viewer accordingly.
Parameters:
viewer - the viewer

isFolded

public boolean isFolded()
Returns the state of this annotation.
Returns:
true if collapsed

Eclipse Platform
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.