Package org.jline.reader.impl
Class BufferImpl
- java.lang.Object
-
- org.jline.reader.impl.BufferImpl
-
-
Constructor Summary
Constructors Modifier Constructor Description BufferImpl()
BufferImpl(int size)
private
BufferImpl(BufferImpl buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
adjust(int i)
int
atChar(int i)
boolean
backspace()
Issue a backspace.int
backspace(int num)
Issue num backspaces.boolean
clear()
BufferImpl
copy()
void
copyFrom(Buffer buf)
int
currChar()
boolean
currChar(int ch)
int
cursor()
boolean
cursor(int position)
Move the cursor position to the specified absolute index.boolean
delete()
int
delete(int num)
boolean
down()
private int
getCursorCol()
int
length()
int
move(int num)
Move the cursor where characters.private void
moveGapToCursor()
boolean
moveXY(int dx, int dy)
int
nextChar()
int
prevChar()
java.lang.String
substring(int start)
java.lang.String
substring(int start, int end)
java.lang.String
toString()
boolean
up()
java.lang.String
upToCursor()
void
write(int c)
Write the specific character into the buffer, setting the cursor position ahead one.private void
write(int[] ucps)
void
write(int c, boolean overTyping)
Write the specific character into the buffer, setting the cursor position ahead one.void
write(java.lang.CharSequence str)
Insert the specified chars into the buffer, setting the cursor to the end of the insertion point.void
write(java.lang.CharSequence str, boolean overTyping)
-
-
-
Constructor Detail
-
BufferImpl
public BufferImpl()
-
BufferImpl
public BufferImpl(int size)
-
BufferImpl
private BufferImpl(BufferImpl buffer)
-
-
Method Detail
-
copy
public BufferImpl copy()
-
adjust
private int adjust(int i)
-
write
public void write(int c)
Write the specific character into the buffer, setting the cursor position ahead one.
-
write
public void write(int c, boolean overTyping)
Write the specific character into the buffer, setting the cursor position ahead one. The text may overwrite or insert based on the current setting ofoverTyping
.
-
write
public void write(java.lang.CharSequence str)
Insert the specified chars into the buffer, setting the cursor to the end of the insertion point.
-
write
public void write(java.lang.CharSequence str, boolean overTyping)
-
write
private void write(int[] ucps)
-
substring
public java.lang.String substring(int start, int end)
-
upToCursor
public java.lang.String upToCursor()
- Specified by:
upToCursor
in interfaceBuffer
-
cursor
public boolean cursor(int position)
Move the cursor position to the specified absolute index.
-
move
public int move(int num)
Move the cursor where characters.
-
getCursorCol
private int getCursorCol()
-
backspace
public int backspace(int num)
Issue num backspaces.
-
backspace
public boolean backspace()
Issue a backspace.
-
toString
public java.lang.String toString()
-
moveGapToCursor
private void moveGapToCursor()
-
-