Package jline
Class CursorBuffer
java.lang.Object
jline.CursorBuffer
A CursorBuffer is a holder for a
StringBuffer
that also contains the
current cursor position.- Author:
- Marc Prud'hommeaux
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
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.
-
Field Details
-
cursor
-
-
Constructor Details
-
CursorBuffer
public CursorBuffer()
-
-
Method Details
-
length
-
current
-
clearBuffer
-
write
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().- Parameters:
c
- the character to insert
-
write
Insert the specifiedString
into the buffer, setting the cursor to the end of the insertion point.- Parameters:
str
- the String to insert. Must not be null.
-
toString
-
isOvertyping
-
setOvertyping
-
getBuffer
-
setBuffer
-