com.raelity.jvi.swing
Class PositionSegment
java.lang.Object
javax.swing.text.Segment
com.raelity.jvi.swing.PositionSegment
- All Implemented Interfaces:
- CharSequence, Cloneable, CharacterIterator
public class PositionSegment
- extends Segment
An extension of Segment that includes additional information,
including the postion of the
segment within the document.
|
Field Summary |
int |
line
The line number of the segment. |
int |
position
The offset of the start of the segment in the document. |
| Methods inherited from class javax.swing.text.Segment |
charAt, clone, current, first, getBeginIndex, getEndIndex, getIndex, isPartialReturn, last, length, next, previous, setIndex, setPartialReturn, subSequence, toString |
position
public int position
- The offset of the start of the segment in the document.
Note that offset is already a field name.
line
public int line
- The line number of the segment. The first line is numbered at 1.
This is negative if the
segment does not correspond to a single line.
PositionSegment
public PositionSegment()