com.raelity.jvi.swing
Class PositionSegment

java.lang.Object
  extended by javax.swing.text.Segment
      extended by 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.
 
Fields inherited from class javax.swing.text.Segment
array, count, offset
 
Fields inherited from interface java.text.CharacterIterator
DONE
 
Constructor Summary
PositionSegment()
           
 
Method Summary
 
Methods inherited from class javax.swing.text.Segment
charAt, clone, current, first, getBeginIndex, getEndIndex, getIndex, isPartialReturn, last, length, next, previous, setIndex, setPartialReturn, subSequence, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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.

Constructor Detail

PositionSegment

public PositionSegment()