@Test public void testGetItemsRowNumberColumn() { setupGrid(makeHasNameForDecision(), 0); assertDefaultListItems(grid.getItems(0, 0), true); }
@Override @SuppressWarnings("unused") public List<ListSelectorItem> getItems(final int uiRowIndex, final int uiColumnIndex) { final List<ListSelectorItem> items = new ArrayList<>(); getExpression().get().ifPresent(dtable -> { final boolean isMultiColumn = SelectionUtils.isMultiColumn(model); final DecisionTableUIModelMapperHelper.DecisionTableSection section = DecisionTableUIModelMapperHelper.getSection(dtable, uiColumnIndex); switch (section) { case INPUT_CLAUSES: addInputClauseItems(items, dtable, uiColumnIndex, isMultiColumn); items.add(new ListSelectorDividerItem()); break; case OUTPUT_CLAUSES: addOutputClauseItems(items, dtable, uiColumnIndex, isMultiColumn); items.add(new ListSelectorDividerItem()); break; case ANNOTATION_CLAUSES: addRuleAnnotationClauseItems(items, uiColumnIndex, dtable.getAnnotations().size() <= 1); items.add(new ListSelectorDividerItem()); break; } addDecisionRuleItems(dtable, items, uiRowIndex); }); return items; }
DecisionTableGrid extends BaseExpressionGrid<DecisionTable, DecisionTableGridData, DecisionTableUIModelMapper> implements HasListSelectorControl,
                                                                                                                                       HasHitPolicyControl { @Override @SuppressWarnings("unused") public List<ListSelectorItem> getItems(final int uiRowIndex, final int uiColumnIndex) { final List<ListSelectorItem> items = new ArrayList<>(); getExpression().get().ifPresent(dtable -> { final boolean isMultiColumn = SelectionUtils.isMultiColumn(model); final DecisionTableUIModelMapperHelper.DecisionTableSection section = DecisionTableUIModelMapperHelper.getSection(dtable, uiColumnIndex); switch (section) { case INPUT_CLAUSES: addInputClauseItems(items, dtable, uiColumnIndex, isMultiColumn); items.add(new ListSelectorDividerItem()); break; case OUTPUT_CLAUSES: addOutputClauseItems(items, dtable, uiColumnIndex, isMultiColumn); items.add(new ListSelectorDividerItem()); break; case ANNOTATION_CLAUSES: addRuleAnnotationClauseItems(items, uiColumnIndex, dtable.getAnnotations().size() <= 1); items.add(new ListSelectorDividerItem()); break; } addDecisionRuleItems(dtable, items, uiRowIndex); }); return items; } }
DecisionTableGrid extends BaseExpressionGrid<DecisionTable, DecisionTableGridData, DecisionTableUIModelMapper> implements HasListSelectorControl,
                                                                                                                                       HasHitPolicyControl { @Override @SuppressWarnings("unused") public List<ListSelectorItem> getItems(final int uiRowIndex, final int uiColumnIndex) { final List<ListSelectorItem> items = new ArrayList<>(); getExpression().get().ifPresent(dtable -> { final boolean isMultiColumn = SelectionUtils.isMultiColumn(model); final DecisionTableUIModelMapperHelper.DecisionTableSection section = DecisionTableUIModelMapperHelper.getSection(dtable, uiColumnIndex); switch (section) { case INPUT_CLAUSES: addInputClauseItems(items, dtable, uiColumnIndex, isMultiColumn); items.add(new ListSelectorDividerItem()); break; case OUTPUT_CLAUSES: addOutputClauseItems(items, dtable, uiColumnIndex, isMultiColumn); items.add(new ListSelectorDividerItem()); break; case ANNOTATION_CLAUSES: addRuleAnnotationClauseItems(items, uiColumnIndex, dtable.getAnnotations().size() <= 1); items.add(new ListSelectorDividerItem()); break; } addDecisionRuleItems(dtable, items, uiRowIndex); }); return items; } DecisionTableGrid(final GridCellTuple parent,
                             final Optional<String> nodeUUID,
                             final HasExpression hasExpression,
                             final Optional<HasName> hasName,
                             final DMNGridPanel gridPanel,
                             final DMNGridLayer gridLayer,
                             final DecisionTableGridData gridData,
                             final DefinitionUtils definitionUtils,
                             final SessionManager sessionManager,
                             final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                             final DefaultCanvasCommandFactory canvasCommandFactory,
                             final Event<ExpressionEditorChanged> editorSelectedEvent,
                             final Event<RefreshFormPropertiesEvent> refreshFormPropertiesEvent,
                             final Event<DomainObjectSelectionEvent> domainObjectSelectionEvent,
                             final CellEditorControlsView.Presenter cellEditorControls,
                             final ListSelectorView.Presenter listSelector,
                             final TranslationService translationService,
                             final boolean isOnlyVisualChangeAllowed,
                             final int nesting,
                             final HitPolicyPopoverView.Presenter hitPolicyEditor,
                             final ManagedInstance<ValueAndDataTypePopoverView.Presenter> headerEditors,
                             final ReadOnlyProvider readOnlyProvider); }
DecisionTableGrid extends BaseExpressionGrid<DecisionTable, DecisionTableGridData, DecisionTableUIModelMapper> implements HasListSelectorControl,
                                                                                                                                       HasHitPolicyControl { @Override @SuppressWarnings("unused") public List<ListSelectorItem> getItems(final int uiRowIndex, final int uiColumnIndex) { final List<ListSelectorItem> items = new ArrayList<>(); getExpression().get().ifPresent(dtable -> { final boolean isMultiColumn = SelectionUtils.isMultiColumn(model); final DecisionTableUIModelMapperHelper.DecisionTableSection section = DecisionTableUIModelMapperHelper.getSection(dtable, uiColumnIndex); switch (section) { case INPUT_CLAUSES: addInputClauseItems(items, dtable, uiColumnIndex, isMultiColumn); items.add(new ListSelectorDividerItem()); break; case OUTPUT_CLAUSES: addOutputClauseItems(items, dtable, uiColumnIndex, isMultiColumn); items.add(new ListSelectorDividerItem()); break; case ANNOTATION_CLAUSES: addRuleAnnotationClauseItems(items, uiColumnIndex, dtable.getAnnotations().size() <= 1); items.add(new ListSelectorDividerItem()); break; } addDecisionRuleItems(dtable, items, uiRowIndex); }); return items; } DecisionTableGrid(final GridCellTuple parent,
                             final Optional<String> nodeUUID,
                             final HasExpression hasExpression,
                             final Optional<HasName> hasName,
                             final DMNGridPanel gridPanel,
                             final DMNGridLayer gridLayer,
                             final DecisionTableGridData gridData,
                             final DefinitionUtils definitionUtils,
                             final SessionManager sessionManager,
                             final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                             final DefaultCanvasCommandFactory canvasCommandFactory,
                             final Event<ExpressionEditorChanged> editorSelectedEvent,
                             final Event<RefreshFormPropertiesEvent> refreshFormPropertiesEvent,
                             final Event<DomainObjectSelectionEvent> domainObjectSelectionEvent,
                             final CellEditorControlsView.Presenter cellEditorControls,
                             final ListSelectorView.Presenter listSelector,
                             final TranslationService translationService,
                             final boolean isOnlyVisualChangeAllowed,
                             final int nesting,
                             final HitPolicyPopoverView.Presenter hitPolicyEditor,
                             final ManagedInstance<ValueAndDataTypePopoverView.Presenter> headerEditors,
                             final ReadOnlyProvider readOnlyProvider); @Override DecisionTableUIModelMapper makeUiModelMapper(); @Override void initialiseUiColumns(); @Override void initialiseUiRows(); @Override void initialiseUiCells(); @Override @SuppressWarnings("unused") List<ListSelectorItem> getItems(final int uiRowIndex,
                                           final int uiColumnIndex); @Override void onItemSelected(final ListSelectorItem item); @Override HitPolicy getHitPolicy(); @Override BuiltinAggregator getBuiltinAggregator(); @Override void setHitPolicy(final HitPolicy hitPolicy,
                             final Command onSuccess); @Override void setBuiltinAggregator(final BuiltinAggregator aggregator); @Override void doAfterSelectionChange(final int uiRowIndex,
                                       final int uiColumnIndex); @Override void doAfterHeaderSelectionChange(final int uiHeaderRowIndex,
                                             final int uiHeaderColumnIndex); }
DecisionTableGrid extends BaseExpressionGrid<DecisionTable, DecisionTableGridData, DecisionTableUIModelMapper> implements HasListSelectorControl,
                                                                                                                                       HasHitPolicyControl { @Override @SuppressWarnings("unused") public List<ListSelectorItem> getItems(final int uiRowIndex, final int uiColumnIndex) { final List<ListSelectorItem> items = new ArrayList<>(); getExpression().get().ifPresent(dtable -> { final boolean isMultiColumn = SelectionUtils.isMultiColumn(model); final DecisionTableUIModelMapperHelper.DecisionTableSection section = DecisionTableUIModelMapperHelper.getSection(dtable, uiColumnIndex); switch (section) { case INPUT_CLAUSES: addInputClauseItems(items, dtable, uiColumnIndex, isMultiColumn); items.add(new ListSelectorDividerItem()); break; case OUTPUT_CLAUSES: addOutputClauseItems(items, dtable, uiColumnIndex, isMultiColumn); items.add(new ListSelectorDividerItem()); break; case ANNOTATION_CLAUSES: addRuleAnnotationClauseItems(items, uiColumnIndex, dtable.getAnnotations().size() <= 1); items.add(new ListSelectorDividerItem()); break; } addDecisionRuleItems(dtable, items, uiRowIndex); }); return items; } DecisionTableGrid(final GridCellTuple parent,
                             final Optional<String> nodeUUID,
                             final HasExpression hasExpression,
                             final Optional<HasName> hasName,
                             final DMNGridPanel gridPanel,
                             final DMNGridLayer gridLayer,
                             final DecisionTableGridData gridData,
                             final DefinitionUtils definitionUtils,
                             final SessionManager sessionManager,
                             final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                             final DefaultCanvasCommandFactory canvasCommandFactory,
                             final Event<ExpressionEditorChanged> editorSelectedEvent,
                             final Event<RefreshFormPropertiesEvent> refreshFormPropertiesEvent,
                             final Event<DomainObjectSelectionEvent> domainObjectSelectionEvent,
                             final CellEditorControlsView.Presenter cellEditorControls,
                             final ListSelectorView.Presenter listSelector,
                             final TranslationService translationService,
                             final boolean isOnlyVisualChangeAllowed,
                             final int nesting,
                             final HitPolicyPopoverView.Presenter hitPolicyEditor,
                             final ManagedInstance<ValueAndDataTypePopoverView.Presenter> headerEditors,
                             final ReadOnlyProvider readOnlyProvider); @Override DecisionTableUIModelMapper makeUiModelMapper(); @Override void initialiseUiColumns(); @Override void initialiseUiRows(); @Override void initialiseUiCells(); @Override @SuppressWarnings("unused") List<ListSelectorItem> getItems(final int uiRowIndex,
                                           final int uiColumnIndex); @Override void onItemSelected(final ListSelectorItem item); @Override HitPolicy getHitPolicy(); @Override BuiltinAggregator getBuiltinAggregator(); @Override void setHitPolicy(final HitPolicy hitPolicy,
                             final Command onSuccess); @Override void setBuiltinAggregator(final BuiltinAggregator aggregator); @Override void doAfterSelectionChange(final int uiRowIndex,
                                       final int uiColumnIndex); @Override void doAfterHeaderSelectionChange(final int uiHeaderRowIndex,
                                             final int uiHeaderColumnIndex);  }