Interface IProjectionPosition
-
public interface IProjectionPositionAnIProjectionPositionis a position that is associated with aProjectionAnnotationand that is able to compute its collapsed regions. That is, if aPositionimplements this interface,ProjectionViewerwill delegate to thecomputeProjectionRegionsmethod when determining the document regions that should be collapsed for a certainProjectionAnnotation.- Since:
- 3.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcomputeCaptionOffset(IDocument document)Returns the offset of the caption (the anchor region) of this projection position.IRegion[]computeProjectionRegions(IDocument document)Returns an array of regions that should be collapsed when the annotation belonging to this position is collapsed.
-
-
-
Method Detail
-
computeProjectionRegions
IRegion[] computeProjectionRegions(IDocument document) throws BadLocationException
Returns an array of regions that should be collapsed when the annotation belonging to this position is collapsed. May return null instead of an empty array.- Parameters:
document- the document that this position is attached to- Returns:
- the foldable regions for this position
- Throws:
BadLocationException- if accessing the document fails
-
computeCaptionOffset
int computeCaptionOffset(IDocument document) throws BadLocationException
Returns the offset of the caption (the anchor region) of this projection position. The returned offset is relative to the receivers offset into the document.- Parameters:
document- the document that this position is attached to- Returns:
- the caption offset relative to the position's offset
- Throws:
BadLocationException- if accessing the document fails
-
-