An Emacs buffer implemented using the Swing toolkits.
curPosition
public Caret curPosition
defaultStyle
public static Style defaultStyle
doc
public DefaultStyledDocument doc
inputStyle
public Style inputStyle
modelineDocument
public StyledDocument modelineDocument
redStyle
public static Style redStyle
styles
public static javax.swing.text.StyleContext styles
createPos
public int createPos(int index,
boolean isAfter)
Generate a position at a given index.
The result is a position cookie that must be free'd with releasePos.
- createPos in interface AbstractSequence
index
- offset from beginning of desired positionisAfter
- should the position have the isAfter property
insert
public void insert(String string,
Object style)
- insert in interface Buffer
insert
public void insert(String string,
Object style,
int ipos)
- insert in interface Buffer
insert
public void insert(char ch,
int count)
- insert in interface Buffer
insert
public void insert(int index,
String string,
Object style)
insertFile
public void insertFile(Reader in)
throws Exception
- insertFile in interface Buffer
invoke
public void invoke(Runnable doRun)
- invoke in interface Buffer
gnu.jemacs.buffer.Buffer.invoke(java.lang.Runnable)
nextIndex
public int nextIndex(int ipos)
Get the offset from the beginning corresponding to a position cookie.
- nextIndex in interface AbstractSequence
removePos
public void removePos(int ipos,
int count)
Remove one or more elements.
- removePos in interface AbstractSequence
ipos
- position where elements should be removedcount
- if non-negative, remove that number of elements
following (poses, posNumber); if negative the negative of the number
of elements to remove before (poses, posNumber).
removeRegion
public void removeRegion(int start,
int end)
throws javax.swing.text.BadLocationException
save
public void save(Writer out)
throws Exception
- save in interface Buffer
scan
public long scan(char target,
int start,
int end,
int count,
boolean allowQuit)
- scan in interface Buffer