public TableRow writeRowRaw(List<String> line) throws Exception {
if (currentLine == 0)
startTable();
- String clz = "\"";
- clz += currentLine % 2 == 0 ? "even" : "odd";
- clz += " "+currentTextSize;
- clz += "\"";
- os.println(" <tr class=" + clz+ ">");
+ String clz = "\""; //$NON-NLS-1$
+ clz += currentLine % 2 == 0 ? "even" : "odd"; //$NON-NLS-1$ //$NON-NLS-2$
+ clz += " "+currentTextSize; //$NON-NLS-1$
+ clz += "\""; //$NON-NLS-1$
+ os.println(" <tr class=" + clz+ ">"); //$NON-NLS-1$ //$NON-NLS-2$
if (line.size() > 1) {
for (int i = 0; i < line.size(); i++) {
String s = line.get(i);
Alignment a = columns.get(i).getAlignment();
- String tdClass = "class=\"" +a.toString()+"\"";
+ String tdClass = "class=\"" +a.toString()+"\""; //$NON-NLS-1$ //$NON-NLS-2$
if (s != null)
- os.println(" <td "+tdClass+">" + s + "</td>");
+ os.println(" <td "+tdClass+">" + s + "</td>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
else
- os.println(" <td> </td>");
+ os.println(" <td> </td>"); //$NON-NLS-1$
}
} else if (line.size() == 1){
String s = line.get(0);
Alignment a = columns.get(0).getAlignment();
- String tdClass = "class=\"" +a.toString()+"\"";
+ String tdClass = "class=\"" +a.toString()+"\""; //$NON-NLS-1$ //$NON-NLS-2$
if (s != null)
- os.println(" <td "+tdClass + " colspan=\"" + columns.size()+"\">" + s + "</td>");
+ os.println(" <td "+tdClass + " colspan=\"" + columns.size()+"\">" + s + "</td>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
else
- os.println(" <td colspan=\"" + columns.size()+"\"> </td>");
+ os.println(" <td colspan=\"" + columns.size()+"\"> </td>"); //$NON-NLS-1$ //$NON-NLS-2$
} else {
- os.println(" <td colspan=\"" + columns.size()+"\"> </td>");
+ os.println(" <td colspan=\"" + columns.size()+"\"> </td>"); //$NON-NLS-1$ //$NON-NLS-2$
}
- os.println(" </tr>");
+ os.println(" </tr>"); //$NON-NLS-1$
currentLine++;
writer.currentLine++;
return new HTMLTableRow(null);
public TableRow writeRowRaw2(List<TextItem> line) throws Exception {
if (currentLine == 0)
startTable();
- String clz = "\"";
- clz += currentLine % 2 == 0 ? "even" : "odd";
- clz += " "+currentTextSize;
- clz += "\"";
- os.println(" <tr class=" + clz+ ">");
+ String clz = "\""; //$NON-NLS-1$
+ clz += currentLine % 2 == 0 ? "even" : "odd"; //$NON-NLS-1$ //$NON-NLS-2$
+ clz += " "+currentTextSize; //$NON-NLS-1$
+ clz += "\""; //$NON-NLS-1$
+ os.println(" <tr class=" + clz+ ">"); //$NON-NLS-1$ //$NON-NLS-2$
if (line.size() > 1) {
for (int i = 0; i < line.size(); i++) {
TextItem item = line.get(i);
Alignment a = columns.get(i).getAlignment();
- String tdClass = "class=\"" +a.toString()+"\"";
+ String tdClass = "class=\"" +a.toString()+"\""; //$NON-NLS-1$ //$NON-NLS-2$
if (item != null && item.getText() != null)
- os.println(" <td "+tdClass+">" + item.toString() + "</td>");
+ os.println(" <td "+tdClass+">" + item.toString() + "</td>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
else
- os.println(" <td> </td>");
+ os.println(" <td> </td>"); //$NON-NLS-1$
}
} else if (line.size() == 1){
String s = line.get(0).toString();
Alignment a = columns.get(0).getAlignment();
- String tdClass = "class=\"" +a.toString()+"\"";
+ String tdClass = "class=\"" +a.toString()+"\""; //$NON-NLS-1$ //$NON-NLS-2$
if (s != null)
- os.println(" <td "+tdClass + " colspan=\"" + columns.size()+"\">" + s + "</td>");
+ os.println(" <td "+tdClass + " colspan=\"" + columns.size()+"\">" + s + "</td>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
else
- os.println(" <td colspan=\"" + columns.size()+"\"> </td>");
+ os.println(" <td colspan=\"" + columns.size()+"\"> </td>"); //$NON-NLS-1$ //$NON-NLS-2$
} else {
- os.println(" <td colspan=\"" + columns.size()+"\"> </td>");
+ os.println(" <td colspan=\"" + columns.size()+"\"> </td>"); //$NON-NLS-1$ //$NON-NLS-2$
}
- os.println(" </tr>");
+ os.println(" </tr>"); //$NON-NLS-1$
currentLine++;
writer.currentLine++;
return new HTMLTableRow(null);
void style() {
for (int i = 0; i < columns.size(); i++) {
- os.println("table."+classID+" th.column"+i+" {");
- os.println(" width: " + ((int)(columns.get(i).getWidth()*100.0)) + "%;");
- os.println("}");
+ os.println("table."+classID+" th.column"+i+" {"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ os.println(" width: " + ((int)(columns.get(i).getWidth()*100.0)) + "%;"); //$NON-NLS-1$ //$NON-NLS-2$
+ os.println("}"); //$NON-NLS-1$
}
}
void startTable() {
if (id != null) {
- os.println("<a id=\"" + id + "\"></a>");
+ os.println("<a id=\"" + id + "\"></a>"); //$NON-NLS-1$ //$NON-NLS-2$
}
- String clz = classID + " " + (linesVisible ? "lines" : "nolines");
- os.println("<table class=\"" + clz +"\" >");
+ String clz = classID + " " + (linesVisible ? "lines" : "nolines"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ os.println("<table class=\"" + clz +"\" >"); //$NON-NLS-1$ //$NON-NLS-2$
if (headerVisible) {
if (title != null)
- os.println(" <caption>"+title+"</caption>");
- os.println(" <thead>");
- os.println(" <tr class=MEDIUM>");
+ os.println(" <caption>"+title+"</caption>"); //$NON-NLS-1$ //$NON-NLS-2$
+ os.println(" <thead>"); //$NON-NLS-1$
+ os.println(" <tr class=MEDIUM>"); //$NON-NLS-1$
int ci = 0;
for (TableColumn c : columns) {
- os.println(" <th class=\"column" + ci +"\">" + escape(c.getName()) + "</th>");
+ os.println(" <th class=\"column" + ci +"\">" + escape(c.getName()) + "</th>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ci++;
}
- os.println(" </tr>");
- os.println(" </thead>");
+ os.println(" </tr>"); //$NON-NLS-1$
+ os.println(" </thead>"); //$NON-NLS-1$
}
- os.println(" <tbody>");
+ os.println(" <tbody>"); //$NON-NLS-1$
}
void endTable() throws Exception{
if (currentLine > 0) {
- os.println(" </tbody>");
- os.println("</table>");
- os.println("<br>");
+ os.println(" </tbody>"); //$NON-NLS-1$
+ os.println("</table>"); //$NON-NLS-1$
+ os.println("<br>"); //$NON-NLS-1$
if (!copyStyle) {
- os.println("<style>");
+ os.println("<style>"); //$NON-NLS-1$
style();
- os.println("</style>");
+ os.println("</style>"); //$NON-NLS-1$
}
}
}