public class Display extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
canScroll |
protected Map<InfoCmp.Capability,Integer> |
cost |
protected boolean |
cursorDownIsNewLine |
protected int |
cursorPos |
protected boolean |
delayedWrapAtEol |
protected boolean |
delayLineWrap |
protected boolean |
fullScreen |
protected List<AttributedString> |
oldLines |
protected boolean |
reset |
protected int |
rows |
protected Terminal |
terminal |
protected boolean |
wrapAtEol |
Constructor and Description |
---|
Display(Terminal terminal,
boolean fullscreen) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
can(InfoCmp.Capability single,
InfoCmp.Capability multi) |
void |
clear()
Clears the whole screen.
|
boolean |
delayLineWrap()
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)
Move cursor from cursorPos to argument, updating cursorPos
We're at the right margin if
(cursorPos % columns1) == columns . |
protected void |
moveVisualCursorTo(int targetPos,
List<AttributedString> newLines)
Move cursor from cursorPos to argument, updating cursorPos
We're at the right margin if
(cursorPos % columns1) == columns . |
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 |
wcwidth(String str) |
protected final Terminal terminal
protected final boolean fullScreen
protected List<AttributedString> oldLines
protected int cursorPos
protected int rows
protected boolean reset
protected boolean delayLineWrap
protected final Map<InfoCmp.Capability,Integer> cost
protected final boolean canScroll
protected final boolean wrapAtEol
protected final boolean delayedWrapAtEol
protected final boolean cursorDownIsNewLine
public Display(Terminal terminal, boolean fullscreen)
public boolean delayLineWrap()
org.jline.reader.LineReader.Option#DELAY_LINE_WRAP
.public void setDelayLineWrap(boolean v)
public void resize(int rows, int columns)
public void reset()
public void clear()
public void update(List<AttributedString> newLines, int targetCursorPos)
targetCursorPos
- desired cursor position - see Size.cursorPos.public void update(List<AttributedString> newLines, int targetCursorPos, boolean flush)
targetCursorPos
- desired cursor position - see Size.cursorPos.flush
- whether the output should be flushed or notprotected boolean deleteLines(int nb)
protected boolean insertLines(int nb)
protected boolean insertChars(int nb)
protected boolean deleteChars(int nb)
protected boolean can(InfoCmp.Capability single, InfoCmp.Capability multi)
protected boolean perform(InfoCmp.Capability single, InfoCmp.Capability multi, int nb)
protected void moveVisualCursorTo(int targetPos, List<AttributedString> newLines)
(cursorPos % columns1) == columns
.
This method knows how to move both *from* and *to* the right margin.protected int moveVisualCursorTo(int i1)
(cursorPos % columns1) == columns
.
This method knows how to move *from* the right margin,
but does not know how to move *to* the right margin.
I.e. (i1 % columns1) == column
is not allowed.public int wcwidth(String str)
Copyright © 2018 JBoss by Red Hat. All rights reserved.