org.crsh.shell
Interface ScreenContext

All Superinterfaces:
Flushable
All Known Subinterfaces:
CommandContext<P>, InteractionContext, InvocationContext<P>, ShellProcessContext, Term
All Known Implementing Classes:
AbstractPipe, ChunkAdapter, ClientProcessContext, ConsoleTerm, ConvertingPipe, CRaSHProcessContext, InvocationContextImpl, JLineProcessContext, PipeLineElement, PipeLineInvocationContext, ProcessContext, RenderAppendable, RenderWriter, SSHInlineShellProcessContext, ToChunkPipe

public interface ScreenContext
extends Flushable

The screen context extends the consumer and add information about the screen.


Method Summary
 int getHeight()
          Returns the screen height in chars.
 int getWidth()
          Returns the screen width in chars.
 void write(Chunk chunk)
          Write a chunk to the screen.
 
Methods inherited from interface java.io.Flushable
flush
 

Method Detail

getWidth

int getWidth()
Returns the screen width in chars. When the value is not positive it means the value could not be determined.

Returns:
the term width

getHeight

int getHeight()
Returns the screen height in chars. When the value is not positive it means the value could not be determined.

Returns:
the term height

write

void write(Chunk chunk)
           throws IOException
Write a chunk to the screen.

Parameters:
chunk - the chunk
Throws:
IOException - any io exception


Copyright © 2013 eXo Platform SAS. All Rights Reserved.