XHTML formatter: distinguish number and boolean v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 04 Jan 2014 23:44:34 +0100
branchv_0
changeset 1373a24be5d8dac
parent 136 c0f9521900bf
child 138 b765713c60e9
XHTML formatter: distinguish number and boolean
java/sql-dk/data/info/globalcode/sql/dk/formatter/XhtmlFormatter.css
java/sql-dk/src/info/globalcode/sql/dk/formatting/XhtmlFormatter.java
     1.1 --- a/java/sql-dk/data/info/globalcode/sql/dk/formatter/XhtmlFormatter.css	Sat Jan 04 23:39:38 2014 +0100
     1.2 +++ b/java/sql-dk/data/info/globalcode/sql/dk/formatter/XhtmlFormatter.css	Sat Jan 04 23:44:34 2014 +0100
     1.3 @@ -32,6 +32,9 @@
     1.4  td.number {
     1.5  	text-align: right;
     1.6  }
     1.7 +td.boolean {
     1.8 +	text-align: right;
     1.9 +}
    1.10  thead tr {
    1.11  	background: #ddd;
    1.12  	color:black;
     2.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/formatting/XhtmlFormatter.java	Sat Jan 04 23:39:38 2014 +0100
     2.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/formatting/XhtmlFormatter.java	Sat Jan 04 23:44:34 2014 +0100
     2.3 @@ -156,8 +156,10 @@
     2.4  
     2.5  	private void printTableData(Object value) {
     2.6  		Map<QName, String> attributes = new HashMap<>(1);
     2.7 -		if (value instanceof Number || value instanceof Boolean) {
     2.8 +		if (value instanceof Number) {
     2.9  			attributes.put(qname("class"), "number");
    2.10 +		} else if (value instanceof Boolean) {
    2.11 +			attributes.put(qname("class"), "boolean");
    2.12  		}
    2.13  		printTextElement(qname("td"), attributes, String.valueOf(value));
    2.14  	}