use of org.eclipse.scout.rt.client.ui.basic.table.ITableRow in project scout.rt by eclipse.
the class InternalTableRowTest method testSetEnabled_NoChange.
@Test
public void testSetEnabled_NoChange() {
TestTable table = new TestTable();
ITableRow row = table.createRow();
InternalTableRow ir = new InternalTableRow(table, row);
assertTrue(ir.isEnabled());
ir.setRowChanging(true);
ir.setEnabled(true);
assertFalse(ir.isRowPropertiesChanged());
ir.setRowChanging(false);
}
use of org.eclipse.scout.rt.client.ui.basic.table.ITableRow in project scout.rt by eclipse.
the class InternalTableRowTest method testValueChange.
@Test
public void testValueChange() {
TestTable table = new TestTable();
ITableRow row = table.createRow();
InternalTableRow ir = new InternalTableRow(table, row);
ir.setRowChanging(true);
ir.cellChanged(ir.getCell(0), ICell.VALUE_BIT);
Set<Integer> changedColumnIdx = ir.getUpdatedColumnIndexes(ICell.VALUE_BIT);
assertEquals(1, changedColumnIdx.size());
assertEquals(Integer.valueOf(0), changedColumnIdx.iterator().next());
ir.setRowChanging(false);
}
use of org.eclipse.scout.rt.client.ui.basic.table.ITableRow in project scout.rt by eclipse.
the class InternalTableRowTest method testSetEnabled.
@Test
public void testSetEnabled() {
TestTable table = new TestTable();
ITableRow row = table.createRow();
InternalTableRow ir = new InternalTableRow(table, row);
assertTrue(ir.isEnabled());
ir.setRowChanging(true);
ir.setEnabled(false);
assertTrue(ir.isRowPropertiesChanged());
ir.setRowChanging(false);
}
use of org.eclipse.scout.rt.client.ui.basic.table.ITableRow in project scout.rt by eclipse.
the class InternalTableRowTest method testValueChange_NoChange.
@Test
public void testValueChange_NoChange() {
TestTable table = new TestTable();
ITableRow row = table.createRow();
InternalTableRow ir = new InternalTableRow(table, row);
ir.setRowChanging(true);
ir.cellChanged(ir.getCell(0), ICell.VALUE_BIT);
Set<Integer> changedColumnIdx = ir.getUpdatedColumnIndexes(ICell.TEXT_BIT);
assertEquals(0, changedColumnIdx.size());
ir.setRowChanging(false);
}
use of org.eclipse.scout.rt.client.ui.basic.table.ITableRow in project scout.rt by eclipse.
the class InternalTableRowTest method testCreateInternalTableRow.
@Test
public void testCreateInternalTableRow() throws Exception {
TestTable table = new TestTable();
ITableRow row = table.createRow();
row.getCellForUpdate(0).setValue("Test");
row.getCellForUpdate(0).setText("TestText");
row.setStatus(ITableRow.STATUS_INSERTED);
InternalTableRow ir = new InternalTableRow(table, row);
assertEquals(row.getStatus(), ir.getStatus());
assertEquals(table, ir.getTable());
assertEquals("Test", ir.getCellForUpdate(0).getValue());
assertEquals("TestText", ir.getCellForUpdate(0).getText());
}
Aggregations