Actually, I just got it working by creating my own HTMLHeader and
HTMLCell. Here it is: 1. The HTMLHeader class: import com.google.gwt.user.cellview.client.Header;
public class HTMLHeader extends Header<String> {
private String html;
public HTMLHeader(String html) {
super(new HTMLCell());
this.html = html;
}
@Override
public String getValue() {
return html;
}
}
2. The HTMLCell class:
import com.google.gwt.cell.client.AbstractCell;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
public class HTMLCell extends AbstractCell<String> {
public HTMLCell() {
}
@Override
public void render(Context context, String value, SafeHtmlBuilder sb) {
if (value != null) {
sb.appendHtmlConstant(value);
}
}
}
3. Add the HTMLHeader aligning it to the right:
myTable.addColumn(myColumn, new HTMLHeader("<div align=\"right\">Hooray</div>")); And you're done!