Package org.jline.utils
Class Display
java.lang.Object
org.jline.utils.Display
Handle display and visual cursor.
- Author:
- Guillaume Nodet
-
Field Summary
Modifier and TypeFieldDescriptionprotected final boolean
protected final Map
<InfoCmp.Capability, Integer> protected final boolean
protected int
protected final boolean
protected boolean
protected final boolean
protected List
<AttributedString> protected boolean
protected int
protected final Terminal
protected final boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
can
(InfoCmp.Capability single, InfoCmp.Capability multi) void
clear()
Clears the whole screen.boolean
If cursor is at right margin, don't wrap immediately.protected boolean
deleteChars
(int nb) protected boolean
deleteLines
(int nb) protected boolean
insertChars
(int nb) protected boolean
insertLines
(int nb) protected int
moveVisualCursorTo
(int i1) protected void
moveVisualCursorTo
(int targetPos, List<AttributedString> newLines) protected boolean
perform
(InfoCmp.Capability single, InfoCmp.Capability multi, int nb) void
reset()
void
resize
(int rows, int columns) void
setDelayLineWrap
(boolean v) void
update
(List<AttributedString> newLines, int targetCursorPos) Update the display according to the new lines and flushes the output.void
update
(List<AttributedString> newLines, int targetCursorPos, boolean flush) Update the display according to the new lines.void
updateAnsi
(List<String> newLines, int targetCursorPos) int
-
Field Details
-
terminal
-
fullScreen
protected final boolean fullScreen -
oldLines
-
cursorPos
protected int cursorPos -
rows
protected int rows -
reset
protected boolean reset -
delayLineWrap
protected boolean delayLineWrap -
cost
-
canScroll
protected final boolean canScroll -
wrapAtEol
protected final boolean wrapAtEol -
delayedWrapAtEol
protected final boolean delayedWrapAtEol -
cursorDownIsNewLine
protected final boolean cursorDownIsNewLine
-
-
Constructor Details
-
Display
-
-
Method Details
-
delayLineWrap
public boolean delayLineWrap()If cursor is at right margin, don't wrap immediately. Seeorg.jline.reader.LineReader.Option#DELAY_LINE_WRAP
.- Returns:
true
if line wrap is delayed,false
otherwise
-
setDelayLineWrap
public void setDelayLineWrap(boolean v) -
resize
public void resize(int rows, int columns) -
reset
public void reset() -
clear
public void clear()Clears the whole screen. Use this method only when using full-screen / application mode. -
updateAnsi
-
update
Update the display according to the new lines and flushes the output.- Parameters:
newLines
- the lines to displaytargetCursorPos
- desired cursor position - see Size.cursorPos.
-
update
Update the display according to the new lines.- Parameters:
newLines
- the lines to displaytargetCursorPos
- desired cursor position - see Size.cursorPos.flush
- whether the output should be flushed or not
-
deleteLines
protected boolean deleteLines(int nb) -
insertLines
protected boolean insertLines(int nb) -
insertChars
protected boolean insertChars(int nb) -
deleteChars
protected boolean deleteChars(int nb) -
can
-
perform
-
moveVisualCursorTo
-
moveVisualCursorTo
protected int moveVisualCursorTo(int i1) -
wcwidth
-