public class MutablePositionRegion extends PositionRegion
PositionRegion.getStartOffset()
<= PositionRegion.getEndOffset()
.Constructor and Description |
---|
MutablePositionRegion(Document doc,
int startOffset,
int endOffset)
Construct new mutable position region based on the knowledge
of the document and starting and ending offset.
|
MutablePositionRegion(Position startPosition,
Position endPosition)
Construct new mutable position region.
|
Modifier and Type | Method and Description |
---|---|
void |
reset(Position startPosition,
Position endPosition)
Set a new start and end positions of this region.
|
void |
setEndPosition(Position endPosition)
Set a new end position of this region.
|
void |
setStartPosition(Position startPosition)
Set a new start position of this region.
|
createFixedPosition, getComparator, getEndOffset, getEndPosition, getLength, getStartOffset, getStartPosition, getString, getText, isRegionsSorted, toString, toString
public MutablePositionRegion(Position startPosition, Position endPosition)
startPosition
- non-null start position of the region <= end position.endPosition
- non-null end position of the region >= start position.public MutablePositionRegion(Document doc, int startOffset, int endOffset) throws BadLocationException
BadLocationException
public final void reset(Position startPosition, Position endPosition)
PositionRegion.getStartOffset()
<= PositionRegion.getEndOffset()
.startPosition
- non-null new start position of this region.public final void setStartPosition(Position startPosition)
PositionRegion.getStartOffset()
<= PositionRegion.getEndOffset()
.startPosition
- non-null new start position of this region.public final void setEndPosition(Position endPosition)
PositionRegion.getStartOffset()
<= PositionRegion.getEndOffset()
.endPosition
- non-null new start position of this region.