}
private void showPopup(MouseEvent e) {
if (e.isPopupTrigger()) {
JPopupMenu popup_menu = null;
switch( whichCondition() ) {
case A : popup_menu = new JPopupMenu();
popup_menu.add(try_again);
popup_menu.add(copy_ed2k_links);
popup_menu.add(close);
popup_menu.add(column_setup);
popup_menu.add(properties);
break;
case B : popup_menu = new JPopupMenu();
popup_menu.add(try_again);
popup_menu.add(copy_ed2k_links);
popup_menu.add(close);
popup_menu.add(column_setup);
break;
case C : popup_menu = new JPopupMenu();
popup_menu.add(try_again);
popup_menu.add(copy_ed2k_links);
popup_menu.add(close);
popup_menu.add(column_setup);
popup_menu.add(properties);
break;
case D : popup_menu = new JPopupMenu();
popup_menu.add(try_again);
popup_menu.add(copy_ed2k_links);
popup_menu.add(close);
popup_menu.add(column_setup);
break;
case E : popup_menu = new JPopupMenu();
popup_menu.add(start_download);
popup_menu.add(try_again);
popup_menu.add(copy_ed2k_links);
popup_menu.add(close);
popup_menu.add(column_setup);
break;
case F : popup_menu = new JPopupMenu();
popup_menu.add(start_download);
popup_menu.add(try_again);
popup_menu.add(copy_ed2k_links);
popup_menu.add(close);
popup_menu.add(column_setup);
break;
case G : popup_menu = new JPopupMenu();
popup_menu.add(start_download);
popup_menu.add(try_again);
popup_menu.add(copy_ed2k_links);
popup_menu.add(close);
popup_menu.add(column_setup);
break;
case H : popup_menu = new JPopupMenu();
popup_menu.add(start_download);
popup_menu.add(try_again);
popup_menu.add(copy_ed2k_links);
popup_menu.add(close);
popup_menu.add(column_setup);
popup_menu.add(properties);
break;
case I : popup_menu = new JPopupMenu();
popup_menu.add(start_download);
popup_menu.add(try_again);
popup_menu.add(copy_ed2k_links);
popup_menu.add(close);
popup_menu.add(column_setup);
break;
case J : popup_menu = new JPopupMenu();
popup_menu.add(close);
popup_menu.add(column_setup);
break;
}
popup_menu.show(e.getComponent(), e.getX(), e.getY());
}
}
}
this.addMouseListener(new PopupListener());
}