use of org.kie.workbench.common.dmn.client.widgets.grid.controls.list.HasListSelectorControl.ListSelectorDividerItem in project kie-wb-common by kiegroup.
the class ListSelectorViewImpl method makeListSelectorItemView.
private Optional<IsElement> makeListSelectorItemView(final ListSelectorItem item) {
Optional<IsElement> listSelectorItemView = Optional.empty();
if (item instanceof ListSelectorTextItem) {
final ListSelectorTextItem ti = (ListSelectorTextItem) item;
final ListSelectorTextItemView selector = listSelectorTextItemViews.get();
selector.setText(ti.getText());
selector.setEnabled(ti.isEnabled());
selector.addClickHandler(() -> {
if (ti.isEnabled()) {
presenter.onItemSelected(item);
}
});
listSelectorItemView = Optional.of(selector);
} else if (item instanceof ListSelectorDividerItem) {
listSelectorItemView = Optional.of(listSelectorDividerItemViews.get());
}
return listSelectorItemView;
}
use of org.kie.workbench.common.dmn.client.widgets.grid.controls.list.HasListSelectorControl.ListSelectorDividerItem in project kie-wb-common by kiegroup.
the class UndefinedExpressionGridTest method testOnItemSelectedDivider.
@Test
public void testOnItemSelectedDivider() {
setupGrid(0);
final ListSelectorDividerItem dItem = mock(ListSelectorDividerItem.class);
grid.onItemSelected(dItem);
verify(cellEditorControls, never()).hide();
verify(grid, never()).onExpressionTypeChanged(any(ExpressionType.class));
}
Aggregations