|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.text.VirtualScreen
public class VirtualScreen
A virtual screen that can be scrolled. This class is thread safe, as it can be used concurrently by two threads, for example one thread can provide new elements while another thread is repainting the buffer to the screen, both threads can either modify the underlying data structure. Paint could also be called concurrently by two threads, one that just provided a new element and wants to repaint the structure and another that changes the current cursor and asks for a repaint too.
| Constructor Summary | |
|---|---|
VirtualScreen(ScreenContext out)
|
|
| Method Summary | |
|---|---|
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()
|
VirtualScreen |
paint()
Pain the underlying screen context. |
boolean |
previousRow()
|
boolean |
update()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VirtualScreen(ScreenContext out)
| Method Detail |
|---|
public int getWidth()
ScreenContext
getWidth in interface ScreenContextpublic int getHeight()
ScreenContext
getHeight in interface ScreenContext
public Screenable append(CharSequence s)
throws IOException
append in interface AppendableIOException
public Screenable append(char c)
throws IOException
append in interface AppendableIOException
public Screenable append(CharSequence csq,
int start,
int end)
throws IOException
append in interface AppendableIOException
public Screenable append(Style style)
throws IOException
append in interface ScreenableIOException
public Screenable cls()
throws IOException
cls in interface ScreenableIOException
public VirtualScreen paint()
throws IOException
IOException - any io exception
public boolean previousRow()
throws IOException
IOExceptionpublic boolean isPainted()
public boolean isRefresh()
public boolean isPainting()
public boolean nextRow()
throws IOException
IOException
public int nextPage()
throws IOException
IOException
public boolean update()
throws IOException
IOException
public void flush()
throws IOException
ScreenContext
flush in interface ScreenContextIOException - any io exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||