@Override
    public void onBrowserEvent(final Context context,
                               final Element parent,
                               final T_ROW value,
                               final NativeEvent event,
                               final ValueUpdater<T_ROW> valueUpdater) {
        super.onBrowserEvent(context, parent, value, event, valueUpdater);
        final DocRef docRef = NullSafe.get(value, docRefFunction);
        if (docRef != null) {
            if (MOUSEDOWN.equals(event.getType())) {
                if (MouseUtil.isPrimary(event)) {
                    onEnterKeyDown(context, parent, value, event, valueUpdater);
                } else {
                    final String type;
                    final DocumentType documentType = DocumentTypeRegistry.get(docRef.getType());
                    type = NullSafe.getOrElse(documentType, DocumentType::getDisplayType,
                            docRef.getType());

                    final List<Item> menuItems = new ArrayList<>();
                    int priority = 1;
                    menuItems.add(new IconMenuItem.Builder()
                            .priority(priority++)
                            .icon(SvgImage.OPEN)
                            .text("Open " + type)
                            .command(() -> OpenDocumentEvent.fire(this, docRef, true))
                            .build());
                    menuItems.add(createCopyAsMenuItem(docRef, priority++));

                    ShowMenuEvent
                            .builder()
                            .items(menuItems)
                            .popupPosition(new PopupPosition(event.getClientX(), event.getClientY()))
                            .fire(this);
                }
            }
        } else {
            final String text = cellTextFunction.apply(value).asString();
            if (MOUSEDOWN.equals(event.getType())) {
                if (MouseUtil.isPrimary(event)) {
                    final Element element = event.getEventTarget().cast();
                    if (ElementUtil.hasClassName(element, CopyTextUtil.COPY_CLASS_NAME, 5)) {
                        if (text != null) {
                            ClipboardUtil.copy(text);
                        }
                    }
                } else if (NullSafe.isNonBlankString(text)) {
                    final List<Item> menuItems = new ArrayList<>();
                    menuItems.add(new IconMenuItem.Builder()
                            .priority(1)
                            .icon(SvgImage.COPY)
                            .text("Copy")
                            .command(() -> ClipboardUtil.copy(text))
                            .build());
                    ShowMenuEvent
                            .builder()
                            .items(menuItems)
                            .popupPosition(new PopupPosition(event.getClientX(), event.getClientY()))
                            .fire(this);
                }
            }
        }
    }
@param showIcon         Set to true to show the type icon next to the text
@param cellTextFunction Function to provide the cell 'text' in HTML form.
@param docRefFunction   Function to provide a doc ref if the value can give us one.
@param cssClassFunction Function to provide additional css class names.
stroom-core-client/src/main/java/stroom/data/client/presenter/DocRefCell.java