private void appendLastRow(StringBuilder graphic, int width) { appendDelimiterRow( graphic, width, horizontalLower, style.getDelimiterBound(Direction8.DownLeft), style.getDelimiterBound(Direction8.Down), style.getDelimiterBound(Direction8.DownRight)); }
private void appendDelimiterRow(StringBuilder graphic, int width) { appendDelimiterRow( graphic, width, horizontal, style.getDelimiterBound(Direction8.Left), style.getCenter(), style.getDelimiterBound(Direction8.Right)); }
private void appendFirstRow(StringBuilder graphic, int width) { appendDelimiterRow( graphic, width, horizontalUpper, style.getDelimiterBound(Direction8.TopLeft), style.getDelimiterBound(Direction8.Top), style.getDelimiterBound(Direction8.TopRight)); }
private void appendContentRow(StringBuilder graphic, int y, int width, CellMatrix<E> matrix) { graphic.append(style.getBound(Bounds.LEFT)); for (int x = 0; x < width - 1; x++) { graphic.append(appendCellContent(matrix, x, y)); graphic.append(style.getGrid(Orientation.VERTICAL)); } graphic.append(appendCellContent(matrix, width - 1, y)); graphic.append(style.getBound(Bounds.RIGHT)).append("\n"); }
public CellMatrixFormatter(CellMatrixFormatterStyle style) { this.style = style; horizontalUpper = getThree(style.getBound(Bounds.UPPER)); horizontal = getThree(style.getGrid(Orientation.HORIZONTAL)); horizontalLower = getThree(style.getBound(Bounds.LOWER)); }
private String appendCellContent(CellMatrix<E> matrix, int x, int y) { E cell = matrix.getCell(x, y); return cell != null ? getFormatter(cell).format(cell) : " " + style.getUndefined() + " "; }