public class SwtBuffer extends Buffer
activeKeymaps, buffers, fileBuffers, markMarker, pointMarkerATTRIBUTE_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, consume, countColumns, currentColumn, currentColumn, display, fill, fill, 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, writeToadd, add, addAll, addAll, addPos, boundedHash, clear, compare, compare, compare, consume, consumeNext, consumePosRange, contains, containsAll, copyPos, createRelativePos, elements, endPos, equals, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, getAttribute, getAttributeLength, getContainingSequenceSize, getEffectiveIndex, getIndexDifference, getIterator, getIterator, getIteratorAtPos, getLowBound, getNextKind, getNextTypeName, getNextTypeObject, getPosNext, getPosPrevious, 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, setPosNext, setPosPrevious, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, unsupported, unsupportedExceptionclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, subList, toArray, toArrayconsumeboundedHashpublic SwtBuffer(java.lang.String name)
public SwtBuffer(java.lang.String name,
BufferContent content)
public void redrawModeline()
redrawModeline in class BufferBuffer.redrawModeline()public FString getModelineFormat()
public int getLength()
getLength in class BufferBuffer.getLength()public int getDot()
getDot in class BufferBuffer.getDot()public void setDot(int dot)
BuffersetDot in class BufferBuffer.setDot(int)public int maxDot()
maxDot in class BufferBuffer.maxDot()public void insert(java.lang.String string,
java.lang.Object style,
int ipos)
Bufferpublic void insertChar(int ch,
int count,
java.lang.Object style)
BufferinsertChar in class BufferBuffer.insertChar(int, int, java.lang.Object)public void removeRegion(int start,
int end)
removeRegion in class Bufferpublic void removeAll()
removeAll in class BufferBuffer.removeAll()public void insertFile(java.io.Reader in)
throws java.lang.Exception
insertFile in class Bufferjava.lang.ExceptionBuffer.insertFile(java.io.Reader)public void save(java.io.Writer out)
throws java.lang.Exception
save in class Bufferjava.lang.ExceptionBuffer.save(java.io.Writer)public void removeChar(int count)
removeChar in class BufferBuffer.removeChar(int)public int lineStartOffset(int offset)
lineStartOffset in class BufferBuffer.lineStartOffset(int)public long scan(char target,
int start,
int end,
int count,
boolean allowQuit)
Bufferscan in class BufferBuffer.scan(char, int, int, int, boolean)public CharSeq getStringContent()
getStringContent in class Bufferpublic gnu.kawa.io.InPort openReader(int start,
int count)
openReader in class BufferBuffer.openReader(int, int)public long savePointMark()
savePointMark in class BufferBuffer.savePointMark()public void restorePointMark(long pointMark)
restorePointMark in class BufferBuffer.restorePointMark(long)public void invoke(java.lang.Runnable doRun)
Bufferinvoke in class BufferBuffer.invoke(java.lang.Runnable)public int size()
AbstractSequencesize 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)
SequenceAbstractSequence.get(int)public int createPos(int index,
boolean isAfter)
AbstractSequencecreatePos 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 BufferBuffer.forwardLine(int)