formatter.setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_RIGHT);
formatter.setWidth(0, 2, "100%");
}
public void testStyles() {
HTMLTable t = getTable(4, 4);
t.getCellFormatter().setStyleName(2, 2, "hello");
assertEquals("hello", t.getCellFormatter().getStyleName(2, 2));
t.getCellFormatter().setStyleName(2, 2, "goodbye");
t.getCellFormatter().addStyleName(2, 2, "hello");
// Visable Styles.
t.getCellFormatter().setVisible(0, 0, false);
assertTrue(t.getCellFormatter().isVisible(2, 2));
assertFalse(t.getCellFormatter().isVisible(0, 0));
RowFormatter formatter = t.getRowFormatter();
formatter.setVisible(3, false);
assertFalse(formatter.isVisible(3));
assertTrue(formatter.isVisible(2));
assertTrue(t.getCellFormatter().isVisible(2, 0));
// Style name.
assertEquals("goodbye hello", t.getCellFormatter().getStyleName(2, 2));
t.getRowFormatter().setStyleName(3, "newStyle");
assertEquals("newStyle", t.getRowFormatter().getStyleName(3));
}