程序包 jline
类 CursorBuffer
java.lang.Object
jline.CursorBuffer
A CursorBuffer is a holder for a
StringBuffer
that also contains the
current cursor position.-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明boolean
char
current()
boolean
int
length()
void
setBuffer
(StringBuffer buffer) void
setOvertyping
(boolean b) toString()
void
write
(char c) Write the specific character into the buffer, setting the cursor position ahead one.void
Insert the specifiedString
into the buffer, setting the cursor to the end of the insertion point.
-
字段详细资料
-
cursor
public int cursor
-
-
构造器详细资料
-
CursorBuffer
public CursorBuffer()
-
-
方法详细资料
-
length
public int length() -
current
public char current() -
clearBuffer
public boolean clearBuffer() -
write
public void write(char c) Write the specific character into the buffer, setting the cursor position ahead one. The text may overwrite or insert based on the current setting of isOvertyping().- 参数:
c
- the character to insert
-
write
Insert the specifiedString
into the buffer, setting the cursor to the end of the insertion point.- 参数:
str
- the String to insert. Must not be null.
-
toString
-
isOvertyping
public boolean isOvertyping() -
setOvertyping
public void setOvertyping(boolean b) -
getBuffer
-
setBuffer
-