|
||||||||||
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 OrderedDocumentRegion
update
in class DocumentRegion
public OpenDefinitionsDocument getDocument()
getDocument
in interface IDocumentRegion
getDocument
in class DocumentRegion
public int getStartOffset()
getStartOffset
in interface Region
getStartOffset
in class DocumentRegion
public int getEndOffset()
getEndOffset
in interface Region
getEndOffset
in class DocumentRegion
public int getLineStartOffset()
DocumentRegion
getLineStartOffset
in interface OrderedDocumentRegion
getLineStartOffset
in class DocumentRegion
public int getLineEndOffset()
DocumentRegion
getLineEndOffset
in interface OrderedDocumentRegion
getLineEndOffset
in class DocumentRegion
public String getString()
DocumentRegion
getString
in interface OrderedDocumentRegion
getString
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 |