public class SwtBuffer extends Buffer
activeKeymaps, buffers, fileBuffers, markMarker, pointMarker
noInts
ATTRIBUTE_VALUE, BOOLEAN_VALUE, CDATA_VALUE, CHAR_VALUE, COMMENT_VALUE, DOCUMENT_VALUE, DOUBLE_VALUE, ELEMENT_VALUE, EOF_VALUE, eofValue, FLOAT_VALUE, INT_S16_VALUE, INT_S32_VALUE, INT_S64_VALUE, INT_S8_VALUE, INT_U16_VALUE, INT_U32_VALUE, INT_U64_VALUE, INT_U8_VALUE, OBJECT_VALUE, PRIM_VALUE, PROCESSING_INSTRUCTION_VALUE, TEXT_BYTE_VALUE
Constructor and Description |
---|
SwtBuffer(java.lang.String name) |
SwtBuffer(java.lang.String name,
BufferContent content) |
Modifier and Type | Method and Description |
---|---|
int |
createPos(int index,
boolean isAfter)
Generate a position at a given index.
|
int |
forwardLine(int lines) |
java.lang.Object |
get(int index)
See java.util.List.
|
StyledTextContent |
getBufferContent() |
int |
getDot() |
int |
getLength() |
FString |
getModelineFormat() |
CharSeq |
getStringContent() |
void |
insert(java.lang.String string,
java.lang.Object style,
int ipos)
Insert string with given style at position pair.
|
void |
insertChar(int ch,
int count,
java.lang.Object style)
Insert count copies of ch at point.
|
void |
insertFile(java.io.Reader in) |
void |
invoke(java.lang.Runnable doRun)
This is intended for Runnable's that may affect the state of the buffer.
|
int |
lineStartOffset(int offset) |
int |
maxDot() |
gnu.kawa.io.InPort |
openReader(int start,
int count) |
void |
redrawModeline() |
void |
removeAll() |
void |
removeChar(int count) |
void |
removeRegion(int start,
int end) |
void |
restorePointMark(long pointMark) |
void |
save(java.io.Writer out) |
long |
savePointMark() |
long |
scan(char target,
int start,
int end,
int count,
boolean allowQuit)
Search in BUF for COUNT instances of the character TARGET between START and END.
|
void |
setDot(int dot)
Set the current position (point) (0-origin).
|
int |
size()
See java.util.List.
|
backwardChar, charAt, charWidth, checkMark, coerceBuffer, countColumns, currentColumn, currentColumn, display, findFile, forwardChar, forwardLine, generateNewBufferName, getBuffer, getChars, getCurrent, getFileName, getLocalKeymap, getMarkMarker, getName, getPath, getPoint, getPointMarker, getReadOnly, insert, insert, insert, insertAll, insertChar, insertFile, length, lineStartOffset, makeBufferLocal, minDot, moveToColumn, positionToOffset, save, setCharacterAt, setCharAt, setCurrent, setFileName, setLocalKeymap, setPath, setPoint, setReadOnly, subSequence, toString, writeTo, writeTo
add, add, addAll, addAll, addPos, asImmutable, badRank, boundedHash, checkCanWrite, checkRank, clear, compare, compare, compare, consume, consume, consumeNext, consumePosRange, contains, containsAll, copyPos, createRelativePos, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, elements, endPos, equals, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, get, get, get, getAttribute, getAttributeLength, getBooleanRaw, getByteRaw, getCharRaw, getContainingSequenceSize, getDoubleRaw, getElementKind, getFloatRaw, getIndexDifference, getInt, getInt, getInt, getInt, getInt, getIntRaw, getIterator, getIterator, getIteratorAtPos, getLongRaw, getLowBound, getNextKind, getNextTypeName, getNextTypeObject, getPosNext, getPosPrevious, getRaw, getRowMajor, getShortRaw, getSize, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hashCode, hasNext, hasPrevious, indexOf, isAfterPos, isEmpty, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextIndex, nextMatching, nextPos, parentPos, previousPos, rank, releasePos, remove, remove, removeAll, removePos, removePosRange, retainAll, set, set, setAt, setBuffer, setPosNext, setPosPrevious, setRaw, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, unsupported, unsupportedException
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, sort, spliterator, subList, toArray, toArray
consume
boundedHash
public SwtBuffer(java.lang.String name)
public SwtBuffer(java.lang.String name, BufferContent content)
public void redrawModeline()
redrawModeline
in class Buffer
Buffer.redrawModeline()
public FString getModelineFormat()
public int getLength()
getLength
in class Buffer
Buffer.getLength()
public int getDot()
getDot
in class Buffer
Buffer.getDot()
public void setDot(int dot)
Buffer
setDot
in class Buffer
Buffer.setDot(int)
public int maxDot()
maxDot
in class Buffer
Buffer.maxDot()
public void insert(java.lang.String string, java.lang.Object style, int ipos)
Buffer
public void insertChar(int ch, int count, java.lang.Object style)
Buffer
insertChar
in class Buffer
Buffer.insertChar(int, int, java.lang.Object)
public void removeRegion(int start, int end)
removeRegion
in class Buffer
public void removeAll()
removeAll
in class Buffer
Buffer.removeAll()
public void insertFile(java.io.Reader in) throws java.lang.Exception
insertFile
in class Buffer
java.lang.Exception
Buffer.insertFile(java.io.Reader)
public void save(java.io.Writer out) throws java.lang.Exception
save
in class Buffer
java.lang.Exception
Buffer.save(java.io.Writer)
public void removeChar(int count)
removeChar
in class Buffer
Buffer.removeChar(int)
public int lineStartOffset(int offset)
lineStartOffset
in class Buffer
Buffer.lineStartOffset(int)
public long scan(char target, int start, int end, int count, boolean allowQuit)
Buffer
END >= START
is required.
If COUNT is negative, search backwards for the -COUNTth instance;
inn this case END <= START
is required.
If COUNT is zero, do anything you please; run rogue, for all I care.
If END is zero, use beginning or end of (FIXME: accessible part of)
the buffer, as appropriate for the direction indicated by COUNT.
If we find COUNT instances, SHORTAGE is zero, and return the
position after the COUNTth match. Note that for reverse motion
this is not the same as the usual convention for Emacs motion commands.
If we don't find COUNT instances before reaching END, set SHORTAGE
to the number of TARGETs left unfound,
and return (shortage<<32|END)
.scan
in class Buffer
(SHORTAGE<<32|POS)
Buffer.scan(char, int, int, int, boolean)
public CharSeq getStringContent()
getStringContent
in class Buffer
public gnu.kawa.io.InPort openReader(int start, int count)
openReader
in class Buffer
Buffer.openReader(int, int)
public long savePointMark()
savePointMark
in class Buffer
Buffer.savePointMark()
public void restorePointMark(long pointMark)
restorePointMark
in class Buffer
Buffer.restorePointMark(long)
public void invoke(java.lang.Runnable doRun)
Buffer
invoke
in class Buffer
Buffer.invoke(java.lang.Runnable)
public int size()
Sequence
size
in interface Sequence<Char>
size
in interface java.util.Collection<Char>
size
in interface java.util.List<Char>
size
in class AbstractSequence<Char>
AbstractSequence.size()
public java.lang.Object get(int index)
Sequence
AbstractSequence.get(int)
public int createPos(int index, boolean isAfter)
AbstractSequence
createPos
in class AbstractSequence<Char>
index
- offset from beginning of desired positionisAfter
- should the position have the isAfter propertyAbstractSequence.createPos(int, boolean)
public StyledTextContent getBufferContent()
public int forwardLine(int lines)
forwardLine
in class Buffer
Buffer.forwardLine(int)