use of chatty.gui.components.menus.ChannelContextMenu in project chatty by chatty.
the class LinkController method openContextMenu.
private void openContextMenu(MouseEvent e) {
// the click)
if (!e.getComponent().isShowing()) {
return;
}
User user = getUser(e);
String url = getUrl(e);
EmoticonImage emote = getEmoticon(e);
Usericon usericon = getUsericon(e);
JPopupMenu m;
if (user != null) {
m = new UserContextMenu(user, getAutoModMsgId(e), contextMenuListener);
} else if (url != null) {
m = new UrlContextMenu(url, isUrlDeleted(e), contextMenuListener);
} else if (emote != null) {
m = new EmoteContextMenu(emote, contextMenuListener);
} else if (usericon != null) {
m = new UsericonContextMenu(usericon, contextMenuListener);
} else {
if (defaultContextMenu == null) {
m = new ChannelContextMenu(contextMenuListener);
} else {
m = defaultContextMenu;
}
}
m.show(e.getComponent(), e.getX(), e.getY());
}
Aggregations