public class TableRenderer extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
lastPrintedLine |
protected List<String[]> |
lines |
protected int[] |
maxColumnWidths |
protected int |
minWidth |
protected int |
numColumns |
Constructor and Description |
---|
TableRenderer(int numColumns) |
TableRenderer(int numColumns,
int minWidth) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkLine(String... line) |
protected void |
fillSpaces(PrintStream out,
int pad) |
protected void |
padOrNewline(PrintStream out,
String[] line,
int i) |
void |
printLine(String... line) |
void |
render(OutputStream os) |
void |
render(PrintStream out) |
protected void |
renderLine(PrintStream out,
String[] line) |
protected int[] maxColumnWidths
protected int lastPrintedLine
protected int numColumns
protected int minWidth
public TableRenderer(int numColumns)
public TableRenderer(int numColumns, int minWidth)
public void printLine(String... line)
protected void checkLine(String... line)
public void render(OutputStream os)
public void render(PrintStream out)
protected void renderLine(PrintStream out, String[] line)
protected void padOrNewline(PrintStream out, String[] line, int i)
protected void fillSpaces(PrintStream out, int pad)
Copyright © 2016. All rights reserved.