GuidedDecisionTableViewImpl extends BaseGridWidget implements GuidedDecisionTableView { @Override protected void drawHeader(final BaseGridRendererHelper.RenderingInformation renderingInformation) { super.drawHeader(renderingInformation); headerCaption = makeHeaderCaption(); if (!floatingColumns.isEmpty()) { if (floatingHeader != null) { addCommandToRenderQueue(floatingHeader, (GridRenderer.RenderHeaderBackgroundCommand) (rc) -> { rc.getGroup().add(headerCaption); }); } } else if (isRowNumberAndDescriptionColumnsShown()) { if (header != null) { addCommandToRenderQueue(header, (GridRenderer.RenderHeaderBackgroundCommand) (rc) -> { rc.getGroup().add(headerCaption); }); } } } GuidedDecisionTableViewImpl(final GridData uiModel,
                                       final GridRenderer renderer,
                                       final Presenter presenter,
                                       final GuidedDecisionTable52 model,
                                       final Event<NotificationEvent> notificationEvent); @Override void registerNodeDragMoveHandler(final NodeDragMoveHandler handler); @Override void registerNodeMouseDoubleClickHandler(final NodeMouseDoubleClickHandler handler); @Override boolean onDragHandle(final INodeXYEvent event); @Override boolean isNodeMouseEventOverCaption(final INodeXYEvent event); @Override GuidedDecisionTableView.Presenter getPresenter(); @Override void setLocation(final double x,
                            final double y); @Override void showDataCutNotificationEvent(); @Override void showDataCopiedNotificationEvent(); @Override void showBusyIndicator(final String message); @Override void hideBusyIndicator(); static final int HEADER_CAPTION_WIDTH; static final int HEADER_CAPTION_HEIGHT; }
@Test public void testDrawHeaderWithFloatingColumn() { final BaseGridRendererHelper.RenderingInformation ri = makeRenderingInformation(Arrays.asList(uiDescriptionColumn, uiColumn1, uiColumn2), Collections.singletonList(uiRowNumberColumn)); view.drawHeader(ri); view.executeRenderQueueCommands(true); verify(header, never()).add(any(Group.class)); verify(floatingHeader).add(eq(container)); }
@Test public void testDrawHeaderWithoutFloatingColumn() { final BaseGridRendererHelper.RenderingInformation ri = makeRenderingInformation(Arrays.asList(uiRowNumberColumn, uiDescriptionColumn, uiColumn1, uiColumn2), Collections.emptyList()); view.drawHeader(ri); view.executeRenderQueueCommands(true); verify(header).add(eq(container)); verify(floatingHeader, never()).add(any(Group.class)); }
@Test public void testDrawHeaderWithoutFloatingColumnOrRowNumberOrDescriptionColumns() { final BaseGridRendererHelper.RenderingInformation ri = makeRenderingInformation(Arrays.asList(uiColumn1, uiColumn2), Collections.emptyList()); view.drawHeader(ri); view.executeRenderQueueCommands(true); verify(header, never()).add(any(Group.class)); verify(floatingHeader, never()).add(any(Group.class)); }