org.crsh.shell.ui
Class UIWriterContext

java.lang.Object
  extended by org.crsh.shell.ui.UIWriterContext
All Implemented Interfaces:
ShellWriterContext

 class UIWriterContext
extends Object
implements ShellWriterContext

Version:
$Revision$
Author:
Julien Viet

Field Summary
private static EnumMap<Pad,String> charMap
           
private  InvocationContext context
          .
(package private)  String leftLinePadding
          .
(package private)  boolean needLF
          .
(package private)  boolean needLine
          .
private static EnumMap<Pad,Pad> nextMap
           
(package private)  Style padStyle
          .
(package private)  UIWriterContext parentUIContext
          .
(package private)  String rightLinePadding
          .
(package private)  ArrayList<Pad> stack
          .
 
Constructor Summary
UIWriterContext(InvocationContext context)
           
UIWriterContext(UIWriterContext parentUIContext)
           
 
Method Summary
 int getConsoleWidth()
           
 InvocationContext getInvocationContext()
           
 void lineFeed()
           
 void pad(ShellWriter writer)
           
 int padWidth()
           
 void printLine(int length, ShellWriter writer)
           
 void text(CharSequence csq, int off, int end)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stack

final ArrayList<Pad> stack
.


padStyle

Style padStyle
.


needLF

boolean needLF
.


needLine

boolean needLine
.


context

private final InvocationContext context
.


leftLinePadding

String leftLinePadding
.


rightLinePadding

String rightLinePadding
.


parentUIContext

UIWriterContext parentUIContext
.


charMap

private static EnumMap<Pad,String> charMap

nextMap

private static EnumMap<Pad,Pad> nextMap
Constructor Detail

UIWriterContext

UIWriterContext(InvocationContext context)

UIWriterContext

UIWriterContext(UIWriterContext parentUIContext)
Method Detail

pad

public void pad(ShellWriter writer)
         throws IOException
Specified by:
pad in interface ShellWriterContext
Throws:
IOException

printLine

public void printLine(int length,
                      ShellWriter writer)
               throws IOException
Throws:
IOException

text

public void text(CharSequence csq,
                 int off,
                 int end)
Specified by:
text in interface ShellWriterContext

lineFeed

public void lineFeed()
Specified by:
lineFeed in interface ShellWriterContext

getConsoleWidth

public int getConsoleWidth()

getInvocationContext

public InvocationContext getInvocationContext()

padWidth

public int padWidth()


Copyright © 2012 eXo Platform SAS. All Rights Reserved.