33 |
* <p> |
* <p> |
34 |
* Spans are always of some type, like TextSpan or ImageSpan, |
* Spans are always of some type, like TextSpan or ImageSpan, |
35 |
* and belong to a particular ScrollBlock. |
* and belong to a particular ScrollBlock. |
|
* <p> |
|
|
* The operations for comparing spans are somewhat interesting. |
|
|
* XXX Something not right... |
|
|
* <img src="../../../doc-images/spancomp-1.jpg"/> |
|
|
* <img src="../../../doc-images/spancomp-2.jpg"/> |
|
|
* Important invariants: |
|
|
* <pre> |
|
|
* a.intersectsAfter(b) == b.intersectsBefore(a) |
|
|
* a.intersects(b) == a.intersectsBefore(b) && a.intersectsAfter(b) |
|
|
* </pre> |
|
36 |
* @see Span |
* @see Span |
37 |
* @see Span1D |
* @see Span1D |
38 |
* @see TextSpan |
* @see TextSpan |
53 |
*/ |
*/ |
54 |
ScrollBlock getScrollBlock(); |
ScrollBlock getScrollBlock(); |
55 |
|
|
|
/** If the given span is contained in the same scrollblock after this. |
|
|
* See the images above. |
|
|
*/ |
|
|
// boolean intersectsAfter(Span s); |
|
|
|
|
|
/** If the given span is contained in the same scrollblock before this. |
|
|
*/ |
|
|
// boolean intersectsBefore(Span s); |
|
|
|
|
|
// int compareStart(Span s); |
|
|
// int compareEnd(Span s); |
|
|
|
|
|
|
|
56 |
} |
} |
57 |
|
|