public void hyperlinkUpdate(final HyperlinkEvent evt) {
if( !(evt instanceof MouseHyperlinkEvent) ) {
logger.severe("INTERNAL ERROR, hyperlinkevent is wrong object!");
return;
}
final MouseHyperlinkEvent e = (MouseHyperlinkEvent) evt;
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
// user clicked on 'clickedKey', List 'allKeys' contains all keys
final List<String> allKeys = ((MessageDecoder)messageTextArea.getDecoder()).getHyperlinkedKeys();
final String clickedKey = e.getDescription();
// show menu to download this/all keys and copy this/all to clipboard
showHyperLinkPopupMenu(
e,
clickedKey,
allKeys,
e.getMouseEvent().getX(),
e.getMouseEvent().getY());
}
}
});
filesTable.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(final MouseEvent e) {
if (e.isPopupTrigger()) {
showAttachedFilesPopupMenu(e);
}
}
@Override
public void mouseReleased(final MouseEvent e) {
if (e.isPopupTrigger()) {
showAttachedFilesPopupMenu(e);
}
}
});
boardsTable.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(final MouseEvent e) {
if (e.isPopupTrigger()) {
showAttachedBoardsPopupMenu(e);
}
}
@Override
public void mouseReleased(final MouseEvent e) {
if (e.isPopupTrigger()) {
showAttachedBoardsPopupMenu(e);
}
}
});