gnu.jemacs.buffer
Class BufferWriter
java.lang.Object
java.io.Writer
gnu.jemacs.buffer.BufferWriter
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.Runnable
public class BufferWriter
- extends java.io.Writer
- implements java.lang.Runnable
A Writer that writes at a Buffer's point or a Marker.
Fields inherited from class java.io.Writer |
lock |
Methods inherited from class java.io.Writer |
append, append, append, write, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BufferWriter
public BufferWriter(Marker marker,
boolean adjustPoint)
BufferWriter
public BufferWriter(Buffer buffer)
handleSetCharacterRendition
public int handleSetCharacterRendition(int param,
int position)
- Process an SGR command with the given code.
- Parameters:
param
- parameter value from the escape sequenceposition
- following offset in savedOutput array
- Returns:
- updated value of position, if we gobble multiple parameters
handleOperatingSystemCommand
public void handleOperatingSystemCommand(char ch)
handleCSICommand
public int handleCSICommand(char ch,
int param,
int position)
- Process a single command following CSI.
CSI is "Control Sequence Introducer" - i.e. ESC [.
- Parameters:
ch
- the control commandparam
- parameter value from the escape sequenceposition
- following offset in savedOutput array
- Returns:
- updated value of position, if we gobble multiple parameters
handleEscapeBracket
public void handleEscapeBracket(char ch)
unTabifyRestOfLine
public void unTabifyRestOfLine()
removeChars
public void removeChars(int count)
- Delete characters - but only in current screen line.
moveColumns
public void moveColumns(int count)
- Move some number of columns right (or left if count < 0).
put
public void put(char[] data,
int off,
int len)
write
public void write(int ch)
- Overrides:
write
in class java.io.Writer
write1
public void write1(int ch)
write
public void write(char[] data,
int off,
int len)
- Specified by:
write
in class java.io.Writer
flush
public void flush()
- Specified by:
flush
in interface java.io.Flushable
- Specified by:
flush
in class java.io.Writer
close
public void close()
- Specified by:
close
in interface java.io.Closeable
- Specified by:
close
in class java.io.Writer
run
public void run()
- Specified by:
run
in interface java.lang.Runnable