Class FPOS

  extended by com.raelity.jvi.ViFPOS.abstractFPOS
      extended by com.raelity.jvi.FPOS
All Implemented Interfaces:
ViFPOS, Comparable<ViFPOS>

public class FPOS
extends ViFPOS.abstractFPOS

File position, accessable as line number, 1 based, and column, 0 based.

Any changes or additions here must be considered for WCursor.

NOTE: Methods should not reference offset,lnum,col directly. Must use the accessor to insure that the data is valid.

NOTE: line and column here do not change as the document changes. See Mark for that type of behavior.
NEEDSWORK: This should have a weak reference to Buffer.

Nested Class Summary
Nested classes/interfaces inherited from interface com.raelity.jvi.ViFPOS
Constructor Summary
FPOS(int offset, int line, int column)
          the values are slammed, no validity checking.
Method Summary
 ViFPOS copy()
          Make a copy
 int getColumn()
 int getLine()
 int getOffset()
protected  void initFPOS(int o, int l, int c)
          Used to make a copy.
 void set(int line, int column)
          Set the position.
protected  void setCursor(ViTextView tv)
          use the current caret location to set the offset,line,col
Methods inherited from class com.raelity.jvi.ViFPOS.abstractFPOS
compareTo, equals, set, setColumn, setLine, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public FPOS()


public FPOS(int offset,
            int line,
            int column)
the values are slammed, no validity checking.

Method Detail


protected void initFPOS(int o,
                        int l,
                        int c)
Used to make a copy.


protected void setCursor(ViTextView tv)
use the current caret location to set the offset,line,col


public int getLine()


public int getColumn()


public int getOffset()


public void set(int line,
                int column)
Description copied from interface: ViFPOS
Set the position. This will set the postition on the new line. If the column is less than zero, or past the new line, then it will be restricted. This is optional, may throw an UnsupportedOperationException


public final ViFPOS copy()
Description copied from interface: ViFPOS
Make a copy