public class VirtualScreen extends Object implements ScreenContext
Modifier and Type | Class and Description |
---|---|
private static class |
VirtualScreen.Foo |
Modifier and Type | Field and Description |
---|---|
private ArrayList<VirtualScreen.Foo> |
buffer
.
|
private int |
cursorIndex
The cursor index in the chunk at the current
cursorOffset . |
private int |
cursorOffset
The cursor offset in the
buffer . |
private Style |
cursorStyle
.
|
private int |
cursorX
The cursor coordinate.
|
private int |
cursorY
The cursor coordinate.
|
private int |
height
The cached width and height for the current refresh.
|
private int |
index
The absolute offset, index and row.
|
private int |
offset
The absolute offset, index and row.
|
private ScreenContext |
out
.
|
private static int |
PAINTED |
private static int |
PAINTING |
private static int |
REFRESH |
private int |
row
The absolute offset, index and row.
|
private int |
status
Do we need to clear screen.
|
private Style |
style
The current style for last chunk in the buffer.
|
private int |
width
The cached width and height for the current refresh.
|
Constructor and Description |
---|
VirtualScreen(ScreenContext out) |
Modifier and Type | Method and Description |
---|---|
Screenable |
append(char c) |
Screenable |
append(CharSequence s) |
Screenable |
append(CharSequence csq,
int start,
int end) |
Screenable |
append(Style style) |
Screenable |
cls() |
void |
flush()
Flush the stream.
|
int |
getHeight()
Returns the screen height in chars.
|
int |
getWidth()
Returns the screen width in chars.
|
boolean |
isPainted() |
boolean |
isPainting() |
boolean |
isRefresh() |
int |
nextPage() |
boolean |
nextRow() |
private Pair<Integer,Integer> |
nextRow(int offset,
int index,
int width) |
VirtualScreen |
paint()
Pain the underlying screen context.
|
boolean |
previousRow() |
private int |
scroll(int amount) |
boolean |
update() |
private int width
private int height
private final ArrayList<VirtualScreen.Foo> buffer
private int offset
private int index
private int row
private int cursorX
private int cursorY
private int cursorOffset
buffer
.private int cursorIndex
cursorOffset
.private Style cursorStyle
private final ScreenContext out
private int status
private static final int REFRESH
private static final int PAINTING
private static final int PAINTED
public VirtualScreen(ScreenContext out)
public int getWidth()
ScreenContext
getWidth
in interface ScreenContext
public int getHeight()
ScreenContext
getHeight
in interface ScreenContext
public Screenable append(CharSequence s) throws IOException
append
in interface Appendable
IOException
public Screenable append(char c) throws IOException
append
in interface Appendable
IOException
public Screenable append(CharSequence csq, int start, int end) throws IOException
append
in interface Appendable
IOException
public Screenable append(Style style) throws IOException
append
in interface Screenable
IOException
public Screenable cls() throws IOException
cls
in interface Screenable
IOException
public VirtualScreen paint() throws IOException
IOException
- any io exceptionpublic boolean previousRow() throws IOException
IOException
public boolean isPainted()
public boolean isRefresh()
public boolean isPainting()
public boolean nextRow() throws IOException
IOException
public int nextPage() throws IOException
IOException
private int scroll(int amount) throws IOException
IOException
public boolean update() throws IOException
IOException
public void flush() throws IOException
ScreenContext
flush
in interface ScreenContext
IOException
- any io exceptionCopyright © 2015 eXo Platform SAS. All Rights Reserved.