Search in sources :

Example 21 with ICell

use of org.eclipse.scout.rt.client.ui.basic.cell.ICell in project scout.rt by eclipse.

the class AbstractColumnTest method testInitialDecoration.

@Test
public void testInitialDecoration() {
    TestVetoTable table = new TestVetoTable();
    table.addRowsByArray(new String[] { "decorate" });
    ICell c0 = table.getCell(0, 0);
    assertEquals("decorated", c0.getCssClass());
    assertEquals(1, table.getValidateTestColumn().getDecorateCount());
}
Also used : ICell(org.eclipse.scout.rt.client.ui.basic.cell.ICell) Test(org.junit.Test)

Example 22 with ICell

use of org.eclipse.scout.rt.client.ui.basic.cell.ICell in project scout.rt by eclipse.

the class AbstractColumnTest method testDecoration_SetValue.

@Test
public void testDecoration_SetValue() {
    TestVetoTable table = new TestVetoTable();
    table.addRowsByArray(new String[] { "b" });
    table.getValidateTestColumn().setValue(0, "decorate");
    ICell c0 = table.getCell(0, 0);
    assertEquals("decorated", c0.getCssClass());
    assertEquals(2, table.getValidateTestColumn().getDecorateCount());
}
Also used : ICell(org.eclipse.scout.rt.client.ui.basic.cell.ICell) Test(org.junit.Test)

Example 23 with ICell

use of org.eclipse.scout.rt.client.ui.basic.cell.ICell in project scout.rt by eclipse.

the class AbstractColumnTest method testInvalidColumnVisible.

/**
 * A displayable invalid column should become visible after validation
 */
@Test
public void testInvalidColumnVisible() {
    TestTable testTable = new TestTable();
    testTable.getValidateTestColumn().setVisible(false);
    testTable.addRowsByArray(new String[] { INVALID });
    ICell c0 = testTable.getCell(0, 0);
    assertErrorStatus(c0);
    assertTrue(testTable.getValidateTestColumn().isVisible());
}
Also used : ICell(org.eclipse.scout.rt.client.ui.basic.cell.ICell) Test(org.junit.Test)

Aggregations

ICell (org.eclipse.scout.rt.client.ui.basic.cell.ICell)23 Test (org.junit.Test)15 ITableRow (org.eclipse.scout.rt.client.ui.basic.table.ITableRow)4 Date (java.util.Date)3 SimpleDateFormat (java.text.SimpleDateFormat)2 HashSet (java.util.HashSet)2 Cell (org.eclipse.scout.rt.client.ui.basic.cell.Cell)2 ArrayList (java.util.ArrayList)1 TestDateColumn (org.eclipse.scout.rt.client.ui.basic.table.columns.AbstractDateColumnTest.TestTable.TestDateColumn)1 AbstractIntegerField (org.eclipse.scout.rt.client.ui.form.fields.integerfield.AbstractIntegerField)1 IIntegerField (org.eclipse.scout.rt.client.ui.form.fields.integerfield.IIntegerField)1 IMixedSmartField (org.eclipse.scout.rt.client.ui.form.fields.smartfield.IMixedSmartField)1 PlatformError (org.eclipse.scout.rt.platform.exception.PlatformError)1 IMultiStatus (org.eclipse.scout.rt.platform.status.IMultiStatus)1 ILookupRow (org.eclipse.scout.rt.shared.services.lookup.ILookupRow)1 ICellValueReader (org.eclipse.scout.rt.ui.html.json.basic.cell.ICellValueReader)1 JsonCell (org.eclipse.scout.rt.ui.html.json.basic.cell.JsonCell)1