|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.raelity.jvi.Buffer com.raelity.jvi.swing.DefaultBuffer
public class DefaultBuffer
Nested Class Summary | |
---|---|
static class |
DefaultBuffer.UndoGroupManager
UndoGroupManager is an UndoManager
that allows explicit control of how
UndoableEdit s are coalesced into compound edits,
rather than using the rules defined by the edits themselves. |
Nested classes/interfaces inherited from class com.raelity.jvi.Buffer |
---|
Buffer.VisualBounds |
Field Summary | |
---|---|
static BooleanOption |
cacheTrace
|
Fields inherited from class com.raelity.jvi.Buffer |
---|
b_op_end, b_op_start, b_p_et, b_p_mps, b_p_sw, b_p_ts, b_p_tw, b_visual_end, b_visual_mode, b_visual_start |
Constructor Summary | |
---|---|
DefaultBuffer(ViTextView tv)
|
Method Summary | |
---|---|
void |
beginInsertUndo()
start a insert (user typing) ungo group, must be paired |
protected void |
beginInsertUndoOperation()
|
void |
beginUndo()
start an undo group, must be paired |
protected void |
beginUndoOperation()
|
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 |
endInsertUndo()
end a insert (user typing) ungo group, must be paired |
protected void |
endInsertUndoOperation()
|
void |
endUndo()
end an undo group, must be paired |
protected void |
endUndoOperation()
|
int |
getColumnNumber(int offset)
|
Element |
getCurrentLineElement()
|
protected Document |
getDoc()
|
Document |
getDocument()
Use the document in default implementation. |
protected Element |
getElem(int offset)
|
protected com.raelity.jvi.swing.DefaultBuffer.ElemCache |
getElemCache(int offset)
|
protected int |
getElemIndex(int offset)
|
int |
getLength()
|
int |
getLineCount()
|
Element |
getLineElement(int line)
|
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)
|
TextUtil.MySegment |
getSegment(int offset,
int length,
TextUtil.MySegment seg)
Fill the argument segment with the requested text. |
String |
getText(int offset,
int length)
get some text from the document |
int |
getUndoLength()
|
int |
getUndoOffset()
|
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? |
protected boolean |
isUndoChange()
This method can be used to determine if some action(s) cause a change. |
protected void |
processTextException(BadLocationException ex)
|
void |
redo()
redo a change |
protected void |
redoOperation()
|
void |
reindent(int line,
int count)
platform indent algorithm |
void |
removeShare()
|
void |
replaceChar(int offset,
char c)
|
void |
replaceString(int start,
int end,
String s)
Replace indicated region with string |
void |
setMarkOffset(ViMark mark_arg,
int offset,
boolean global_mark)
Deprecated. |
void |
undo()
undo a change |
protected void |
undoOperation()
|
Methods inherited from class com.raelity.jvi.Buffer |
---|
activateOptions, addBlock, addShare, calculateVisualBlocks, checkModeline, displayFileInfo, docInsert, docRemove, dumpBlocks, getDisplayFileName, getDisplayFileNameAndSize, getHighlightSearchBlocks, getJavaFile, getMark, getRemovedText, getShare, getVisualSelectBlocks, initOptions, isInsertMode, modifyFilename, viOptionSet |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static BooleanOption cacheTrace
Constructor Detail |
---|
public DefaultBuffer(ViTextView tv)
Method Detail |
---|
public void removeShare()
removeShare
in class Buffer
protected final Document getDoc()
public int getLineNumber(int offset)
public int getColumnNumber(int offset)
public int getLineStartOffset(int line)
public int getLineEndOffset(int line)
public int getLineStartOffsetFromOffset(int offset)
public int getLineEndOffsetFromOffset(int offset)
public int getLineCount()
public int getLength()
public final TextUtil.MySegment getSegment(int offset, int length, TextUtil.MySegment seg)
ViBuffer
public boolean isGuarded(int offset)
ViBuffer
public Document getDocument()
public void replaceString(int start, int end, String s)
ViBuffer
public void deleteChar(int start, int end)
ViBuffer
public void insertText(int offset, String s)
ViBuffer
public void replaceChar(int offset, char c)
public String getText(int offset, int length) throws BadLocationException
ViBuffer
BadLocationException
protected void processTextException(BadLocationException ex)
public void reindent(int line, int count)
ViBuffer
public final void undo()
ViBuffer
public final void redo()
ViBuffer
public final void beginUndo()
ViBuffer
public final void endUndo()
ViBuffer
public final boolean isInUndo()
ViBuffer
public final void beginInsertUndo()
ViBuffer
public final void endInsertUndo()
ViBuffer
public final boolean isInInsertUndo()
ViBuffer
protected void beginUndoOperation()
protected void endUndoOperation()
protected void beginInsertUndoOperation()
protected void endInsertUndoOperation()
protected void undoOperation()
protected void redoOperation()
public void setMarkOffset(ViMark mark_arg, int offset, boolean global_mark)
Should use ViMark.set(ViFPOS, ViTextView)
global_mark
- if false then it is a mark within a file, otherwise
it is a file mark and is valid between files.public ViMark createMark()
ViBuffer
protected int getElemIndex(int offset)
protected Element getElem(int offset)
protected com.raelity.jvi.swing.DefaultBuffer.ElemCache getElemCache(int offset)
public final TextUtil.MySegment getLineSegment(int line)
ViBuffer
public final Element getLineElement(int line)
public final Element getCurrentLineElement()
protected boolean isUndoChange()
public int getUndoOffset()
public int getUndoLength()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |