@Test public void testMouseClickEventHandlers() { setupGrid(0); final List<NodeMouseEventHandler> handlers = grid.getNodeMouseClickEventHandlers(selectionManager); assertThat(handlers).hasSize(2); assertThat(handlers.get(0)).isInstanceOf(DelegatingGridWidgetCellSelectorMouseEventHandler.class); assertThat(handlers.get(1)).isInstanceOf(EditableHeaderGridWidgetEditCellMouseEventHandler.class); }
@Override public List<NodeMouseEventHandler> getNodeMouseClickEventHandlers(final GridSelectionManager selectionManager) { final List<NodeMouseEventHandler> handlers = new ArrayList<>(); handlers.add(new DelegatingGridWidgetCellSelectorMouseEventHandler(selectionManager, this::getParentInformation, () -> nesting)); handlers.add(new EditableHeaderGridWidgetEditCellMouseEventHandler()); return handlers; }
LiteralExpressionGrid extends BaseDelegatingExpressionGrid<LiteralExpression, DMNGridData, LiteralExpressionUIModelMapper> implements HasListSelectorControl { @Override public List<NodeMouseEventHandler> getNodeMouseClickEventHandlers(final GridSelectionManager selectionManager) { final List<NodeMouseEventHandler> handlers = new ArrayList<>(); handlers.add(new DelegatingGridWidgetCellSelectorMouseEventHandler(selectionManager, this::getParentInformation, () -> nesting)); handlers.add(new EditableHeaderGridWidgetEditCellMouseEventHandler()); return handlers; } }
LiteralExpressionGrid extends BaseDelegatingExpressionGrid<LiteralExpression, DMNGridData, LiteralExpressionUIModelMapper> implements HasListSelectorControl { @Override public List<NodeMouseEventHandler> getNodeMouseClickEventHandlers(final GridSelectionManager selectionManager) { final List<NodeMouseEventHandler> handlers = new ArrayList<>(); handlers.add(new DelegatingGridWidgetCellSelectorMouseEventHandler(selectionManager, this::getParentInformation, () -> nesting)); handlers.add(new EditableHeaderGridWidgetEditCellMouseEventHandler()); return handlers; } LiteralExpressionGrid(final GridCellTuple parent,
                                 final Optional<String> nodeUUID,
                                 final HasExpression hasExpression,
                                 final Optional<HasName> hasName,
                                 final DMNGridPanel gridPanel,
                                 final DMNGridLayer gridLayer,
                                 final DMNGridData 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 ValueAndDataTypePopoverView.Presenter headerEditor,
                                 final ReadOnlyProvider readOnlyProvider); }
LiteralExpressionGrid extends BaseDelegatingExpressionGrid<LiteralExpression, DMNGridData, LiteralExpressionUIModelMapper> implements HasListSelectorControl { @Override public List<NodeMouseEventHandler> getNodeMouseClickEventHandlers(final GridSelectionManager selectionManager) { final List<NodeMouseEventHandler> handlers = new ArrayList<>(); handlers.add(new DelegatingGridWidgetCellSelectorMouseEventHandler(selectionManager, this::getParentInformation, () -> nesting)); handlers.add(new EditableHeaderGridWidgetEditCellMouseEventHandler()); return handlers; } LiteralExpressionGrid(final GridCellTuple parent,
                                 final Optional<String> nodeUUID,
                                 final HasExpression hasExpression,
                                 final Optional<HasName> hasName,
                                 final DMNGridPanel gridPanel,
                                 final DMNGridLayer gridLayer,
                                 final DMNGridData 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 ValueAndDataTypePopoverView.Presenter headerEditor,
                                 final ReadOnlyProvider readOnlyProvider); @Override List<NodeMouseEventHandler> getNodeMouseClickEventHandlers(final GridSelectionManager selectionManager); @Override List<NodeMouseEventHandler> getNodeMouseDoubleClickEventHandlers(final GridSelectionManager selectionManager,
                                                                            final GridPinnedModeManager pinnedModeManager); @Override LiteralExpressionUIModelMapper makeUiModelMapper(); @Override void initialiseUiRows(); @Override void initialiseUiCells(); @Override double getPadding(); @Override @SuppressWarnings("unused") void doAfterSelectionChange(final int uiRowIndex,
                                       final int uiColumnIndex); @Override void doAfterHeaderSelectionChange(final int uiHeaderRowIndex,
                                             final int uiHeaderColumnIndex); }
LiteralExpressionGrid extends BaseDelegatingExpressionGrid<LiteralExpression, DMNGridData, LiteralExpressionUIModelMapper> implements HasListSelectorControl { @Override public List<NodeMouseEventHandler> getNodeMouseClickEventHandlers(final GridSelectionManager selectionManager) { final List<NodeMouseEventHandler> handlers = new ArrayList<>(); handlers.add(new DelegatingGridWidgetCellSelectorMouseEventHandler(selectionManager, this::getParentInformation, () -> nesting)); handlers.add(new EditableHeaderGridWidgetEditCellMouseEventHandler()); return handlers; } LiteralExpressionGrid(final GridCellTuple parent,
                                 final Optional<String> nodeUUID,
                                 final HasExpression hasExpression,
                                 final Optional<HasName> hasName,
                                 final DMNGridPanel gridPanel,
                                 final DMNGridLayer gridLayer,
                                 final DMNGridData 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 ValueAndDataTypePopoverView.Presenter headerEditor,
                                 final ReadOnlyProvider readOnlyProvider); @Override List<NodeMouseEventHandler> getNodeMouseClickEventHandlers(final GridSelectionManager selectionManager); @Override List<NodeMouseEventHandler> getNodeMouseDoubleClickEventHandlers(final GridSelectionManager selectionManager,
                                                                            final GridPinnedModeManager pinnedModeManager); @Override LiteralExpressionUIModelMapper makeUiModelMapper(); @Override void initialiseUiRows(); @Override void initialiseUiCells(); @Override double getPadding(); @Override @SuppressWarnings("unused") void doAfterSelectionChange(final int uiRowIndex,
                                       final int uiColumnIndex); @Override void doAfterHeaderSelectionChange(final int uiHeaderRowIndex,
                                             final int uiHeaderColumnIndex);  }