use of annis.gui.beans.CitationProvider in project ANNIS by korpling.
the class CitationLinkGenerator method generateCell.
@Override
public Object generateCell(Table source, Object itemId, Object columnId) {
Button btLink = new Button();
btLink.addStyleName(ValoTheme.BUTTON_BORDERLESS);
btLink.setIcon(FontAwesome.SHARE_ALT);
btLink.setDescription("Share query reference link");
btLink.addClickListener(this);
if (itemId instanceof DisplayedResultQuery) {
btLink.addClickListener(new LinkClickListener((DisplayedResultQuery) itemId));
} else if (itemId instanceof Query) {
final CitationProvider citationProvider = new CitationProviderForQuery((Query) itemId);
btLink.addClickListener(new LinkClickListener(citationProvider));
} else if (itemId instanceof CitationProvider) {
final CitationProvider citationProvider = (CitationProvider) itemId;
btLink.addClickListener(new LinkClickListener(citationProvider));
}
return btLink;
}
Aggregations