|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.model.DocumentRegion
edu.rice.cs.drjava.model.MovingDocumentRegion
public class MovingDocumentRegion
Class for a document region that moves with changes in the document; it also includes a lazy tool-tip and line boundaries. TODO: convert _startPos and _endPos to _cachedStart and _cachedEnd which are updated by updateLines
| Field Summary | |
|---|---|
protected Position |
_endPos
|
protected Position |
_lineEndPos
|
protected Position |
_lineStartPos
|
protected Position |
_startPos
|
protected Thunk<String> |
_stringSuspension
Suspension that generates the JTree label excerpt for this region. |
| Fields inherited from class edu.rice.cs.drjava.model.DocumentRegion |
|---|
_doc, _end, _start |
| Constructor Summary | |
|---|---|
MovingDocumentRegion(OpenDefinitionsDocument doc,
int start,
int end,
int lineStart,
int lineEnd)
Create a new moving document region. |
|
| Method Summary | |
|---|---|
static boolean |
equals(Object a,
Object b)
|
OpenDefinitionsDocument |
getDocument()
|
int |
getEndOffset()
|
int |
getLineEndOffset()
Throws exception indicating that getLineEnd() is not supported. |
int |
getLineStartOffset()
Throws exception indicating that getLineStart() is not supported. |
int |
getStartOffset()
|
String |
getString()
Throws exception indicating that getString() is not supported. |
void |
update()
Update _lineStartPos and _lineEndPos after line has been edited. |
| Methods inherited from class edu.rice.cs.drjava.model.DocumentRegion |
|---|
compareTo, equals, isEmpty, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Position _startPos
protected final Position _endPos
protected volatile Position _lineStartPos
protected volatile Position _lineEndPos
protected final Thunk<String> _stringSuspension
| Constructor Detail |
|---|
public MovingDocumentRegion(OpenDefinitionsDocument doc,
int start,
int end,
int lineStart,
int lineEnd)
| Method Detail |
|---|
public void update()
update in interface OrderedDocumentRegionupdate in class DocumentRegionpublic OpenDefinitionsDocument getDocument()
getDocument in interface IDocumentRegiongetDocument in class DocumentRegionpublic int getStartOffset()
getStartOffset in interface RegiongetStartOffset in class DocumentRegionpublic int getEndOffset()
getEndOffset in interface RegiongetEndOffset in class DocumentRegionpublic int getLineStartOffset()
DocumentRegion
getLineStartOffset in interface OrderedDocumentRegiongetLineStartOffset in class DocumentRegionpublic int getLineEndOffset()
DocumentRegion
getLineEndOffset in interface OrderedDocumentRegiongetLineEndOffset in class DocumentRegionpublic String getString()
DocumentRegion
getString in interface OrderedDocumentRegiongetString in class DocumentRegion
public static boolean equals(Object a,
Object b)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||