Interface IProjectionPosition
-
public interface IProjectionPosition
AnIProjectionPosition
is a position that is associated with aProjectionAnnotation
and that is able to compute its collapsed regions. That is, if aPosition
implements this interface,ProjectionViewer
will delegate to thecomputeProjectionRegions
method 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 int
computeCaptionOffset(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
-
-