org.crsh.shell.ui
Class TableElement

java.lang.Object
  extended by org.crsh.shell.ui.Element
      extended by org.crsh.shell.ui.TableElement

public class TableElement
extends Element

Author:
Alain Defrance

Field Summary
private  List<Integer> colsSize
          .
 int MARGIN
          .
private  List<RowElement> rows
          .
 
Constructor Summary
TableElement()
           
 
Method Summary
 TableElement addRow(RowElement row)
           
private  int columnNumber()
           
private  List<Integer> computeColSize(int consoleWidth)
           
(package private)  void doPrint(UIWriterContext ctx, ShellWriter writer)
           
 List<Integer> getColsSize()
           
 List<RowElement> getRows()
           
(package private)  int width()
           
 
Methods inherited from class org.crsh.shell.ui.Element
getBackground, getDecoration, getForeground, getParent, print, print, setBackground, setDecoration, setForeground, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MARGIN

public final int MARGIN
.

See Also:
Constant Field Values

rows

private List<RowElement> rows
.


colsSize

private List<Integer> colsSize
.

Constructor Detail

TableElement

public TableElement()
Method Detail

addRow

public TableElement addRow(RowElement row)

doPrint

void doPrint(UIWriterContext ctx,
             ShellWriter writer)
       throws IOException
Specified by:
doPrint in class Element
Throws:
IOException

getRows

public List<RowElement> getRows()

getColsSize

public List<Integer> getColsSize()

computeColSize

private List<Integer> computeColSize(int consoleWidth)

columnNumber

private int columnNumber()

width

int width()
Specified by:
width in class Element


Copyright © 2012 eXo Platform SAS. All Rights Reserved.