use of org.drools.workbench.screens.guided.dtable.client.widget.table.columns.BaseUiColumn in project drools-wb by kiegroup.
the class GridWidgetColumnFactoryImplTest method columnResizingListenerSetup_ActionInsertFactColumn.
@Test
public void columnResizingListenerSetup_ActionInsertFactColumn() {
final ActionInsertFactCol52 column = new ActionInsertFactCol52();
column.setFactType("MyFact");
column.setFactField("MyField");
column.setHeader("MyColumn");
when(oracle.getFieldType("MyFact", "MyField")).thenReturn(DataType.TYPE_STRING);
final GridColumn<?> uiColumn = factory.convertColumn(column, access, gridWidget);
assertTrue(uiColumn instanceof BaseUiColumn);
assertEquals((int) uiColumn.getWidth(), column.getWidth());
uiColumn.setWidth(200.0);
assertEquals(200, column.getWidth());
}
use of org.drools.workbench.screens.guided.dtable.client.widget.table.columns.BaseUiColumn in project drools-wb by kiegroup.
the class GridWidgetColumnFactoryImplTest method columnResizingListenerSetup_AttributeColumn.
@Test
public void columnResizingListenerSetup_AttributeColumn() {
final AttributeCol52 column = new AttributeCol52();
column.setAttribute(RuleAttributeWidget.SALIENCE_ATTR);
final GridColumn<?> uiColumn = factory.convertColumn(column, access, gridWidget);
assertTrue(uiColumn instanceof BaseUiColumn);
assertEquals((int) uiColumn.getWidth(), column.getWidth());
uiColumn.setWidth(200.0);
assertEquals(200, column.getWidth());
}
use of org.drools.workbench.screens.guided.dtable.client.widget.table.columns.BaseUiColumn in project drools-wb by kiegroup.
the class GridWidgetColumnFactoryImplTest method columnResizingListenerSetup_RowNumberColumn.
@Test
public void columnResizingListenerSetup_RowNumberColumn() {
final BaseColumn column = new RowNumberCol52();
final GridColumn<?> uiColumn = factory.convertColumn(column, access, gridWidget);
assertFalse(uiColumn instanceof BaseUiColumn);
assertEquals((int) uiColumn.getWidth(), column.getWidth());
assertEquals(50.0, column.getWidth(), 0.0);
}
Aggregations