SingleRecordFormatter: escape whitespace characters in the same way as in TabularFormatter (fixed) v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 15 Aug 2015 16:15:30 +0200
branchv_0
changeset 2193b1733fb3793
parent 218 8e38caf43ca8
child 220 0bc544b38cfa
SingleRecordFormatter: escape whitespace characters in the same way as in TabularFormatter (fixed)
java/sql-dk/src/info/globalcode/sql/dk/formatting/TabularFormatter.java
java/sql-dk/src/info/globalcode/sql/dk/formatting/TabularWrappingFormatter.java
     1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/formatting/TabularFormatter.java	Sat Aug 15 16:12:06 2015 +0200
     1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/formatting/TabularFormatter.java	Sat Aug 15 16:15:30 2015 +0200
     1.3 @@ -162,7 +162,7 @@
     1.4  			printTableBorder(" │ ");
     1.5  		}
     1.6  
     1.7 -		Functions.printValueWithWhitespaceReplaced(out, toString(value), TerminalColor.Cyan, TerminalColor.Red);
     1.8 +		printValueWithWhitespaceReplaced(toString(value));
     1.9  
    1.10  		if (isCurrentColumnLast()) {
    1.11  			printTableBorder(" │");
    1.12 @@ -170,6 +170,10 @@
    1.13  
    1.14  	}
    1.15  
    1.16 +	protected void printValueWithWhitespaceReplaced(String text) {
    1.17 +		Functions.printValueWithWhitespaceReplaced(out, text, TerminalColor.Cyan, TerminalColor.Red);
    1.18 +	}
    1.19 +
    1.20  	protected int getColumnWidth(int columnNumber) {
    1.21  		return columnWidth[columnNumber - 1];
    1.22  	}
     2.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/formatting/TabularWrappingFormatter.java	Sat Aug 15 16:12:06 2015 +0200
     2.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/formatting/TabularWrappingFormatter.java	Sat Aug 15 16:15:30 2015 +0200
     2.3 @@ -113,4 +113,4 @@
     2.4  		}
     2.5  		return array;
     2.6  	}
     2.7 -}
     2.8 \ No newline at end of file
     2.9 +}