com.raelity.jvi
Interface ViBuffer

All Known Implementing Classes:
Buffer, DefaultBuffer

public interface ViBuffer


Method Summary
 void beginInsertUndo()
          start a insert (user typing) ungo group, must be paired
 void beginUndo()
          start an undo group, must be paired
 ViMark createMark()
          NEEDSWORK: createMark: attached to this text view, should be in ViBuffer
 void deleteChar(int start, int end)
          Delete a bunch of characters
 void displayFileInfo(ViTextView tv)
           
 void endInsertUndo()
          end a insert (user typing) ungo group, must be paired
 void endUndo()
          end an undo group, must be paired
 int getColumnNumber(int offset)
           
 String getDisplayFileName()
           
 String getDisplayFileNameAndSize()
           
 Object getDocument()
           
 File getJavaFile()
           
 int getLength()
           
 int getLineCount()
           
 int getLineEndOffset(int line)
           
 int getLineEndOffsetFromOffset(int offset)
           
 int getLineNumber(int offset)
           
 TextUtil.MySegment getLineSegment(int line)
          The associated character iterator is initialized with first().
 int getLineStartOffset(int line)
           
 int getLineStartOffsetFromOffset(int offset)
           
 ViMark getMark(int i)
          Fetch the lower case mark.
 TextUtil.MySegment getSegment(int offset, int length, TextUtil.MySegment segment)
          Fill the argument segment with the requested text.
 String getText(int offset, int length)
          get some text from the document
 int[] getVisualSelectBlocks(ViTextView tv, int startOffset, int endOffset)
           
 void insertText(int offset, String s)
          insert text at specified location
 boolean isGuarded(int offset)
          a portion of a document may be write protected
 boolean isInInsertUndo()
          between a insert begin and end undo?
 boolean isInUndo()
          between a begin and an end undo?
 String modifyFilename(char option)
           
 void redo()
          redo a change
 void reindent(int line, int count)
          platform indent algorithm
 void replaceChar(int offset, char c)
           
 void replaceString(int start, int end, String s)
          Replace indicated region with string
 void setMarkOffset(ViMark mark, int offset, boolean global_mark)
          Deprecated. use setMarkPos
 void undo()
          undo a change
 

Method Detail

getDocument

Object getDocument()
Returns:
opaque FileObject backing this Buffer

replaceString

void replaceString(int start,
                   int end,
                   String s)
Replace indicated region with string


deleteChar

void deleteChar(int start,
                int end)
Delete a bunch of characters


insertText

void insertText(int offset,
                String s)
insert text at specified location


getText

String getText(int offset,
               int length)
               throws BadLocationException
get some text from the document

Throws:
BadLocationException

replaceChar

void replaceChar(int offset,
                 char c)

undo

void undo()
undo a change


redo

void redo()
redo a change


isGuarded

boolean isGuarded(int offset)
a portion of a document may be write protected


reindent

void reindent(int line,
              int count)
platform indent algorithm


getLineNumber

int getLineNumber(int offset)
Returns:
the line number, 1 based, corresponding to the offset

getColumnNumber

int getColumnNumber(int offset)
Returns:
the column number, 1 based, corresponding to the offset

getLineStartOffset

int getLineStartOffset(int line)
Returns:
the starting offset of the line

getLineEndOffset

int getLineEndOffset(int line)
Returns:
the starting offset of the line

getLineStartOffsetFromOffset

int getLineStartOffsetFromOffset(int offset)
Returns:
the starting offset of the line

getLineEndOffsetFromOffset

int getLineEndOffsetFromOffset(int offset)
Returns:
the end offset of the line, char past newline

getLineCount

int getLineCount()
Returns:
the number of lines in the associated file

getLength

int getLength()
Returns:
the length of the document

getLineSegment

TextUtil.MySegment getLineSegment(int line)
The associated character iterator is initialized with first().

Returns:
the segment for the line.

getSegment

TextUtil.MySegment getSegment(int offset,
                              int length,
                              TextUtil.MySegment segment)
Fill the argument segment with the requested text. If the segment is null, then create a segment. The associated character iterator is initialized with first().

Returns:
a segment for the requested text.

getVisualSelectBlocks

int[] getVisualSelectBlocks(ViTextView tv,
                            int startOffset,
                            int endOffset)

beginUndo

void beginUndo()
start an undo group, must be paired


endUndo

void endUndo()
end an undo group, must be paired


isInUndo

boolean isInUndo()
between a begin and an end undo?


beginInsertUndo

void beginInsertUndo()
start a insert (user typing) ungo group, must be paired


endInsertUndo

void endInsertUndo()
end a insert (user typing) ungo group, must be paired


isInInsertUndo

boolean isInInsertUndo()
between a insert begin and end undo?


getMark

ViMark getMark(int i)
Fetch the lower case mark. May not be initialized.


setMarkOffset

void setMarkOffset(ViMark mark,
                   int offset,
                   boolean global_mark)
Deprecated. use setMarkPos

associate the indicated mark with a particular offset


createMark

ViMark createMark()
NEEDSWORK: createMark: attached to this text view, should be in ViBuffer

Returns:
a null Mark

displayFileInfo

void displayFileInfo(ViTextView tv)

getDisplayFileName

String getDisplayFileName()

getDisplayFileNameAndSize

String getDisplayFileNameAndSize()

modifyFilename

String modifyFilename(char option)

getJavaFile

File getJavaFile()