if (webPlugin != null && webPlugin.canReceiveProgramsWithTarget()) {
ProgramReceiveTarget[] targets = webPlugin
.getProgramReceiveTargets();
if (targets != null && targets.length > 0) {
final JMenu subMenu = new JMenu(webPlugin.getInfo().getName());
subMenu.setIcon(webPlugin.getMarkIcon());
popupMenu.add(subMenu);
for (final ProgramReceiveTarget target : targets) {
item = new JMenuItem(target.toString());
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
searchWebPlugin(searchText, target);
}
});
if (value.endsWith(target.getTargetId())) {
item.setFont(item.getFont().deriveFont(Font.BOLD));
}
subMenu.add(item);
}
}
}
popupMenu.addSeparator();
popupMenu.add(addFavoriteMenuItem(searchText, actorFavorite));
popupMenu.addSeparator();
}
JMenu subMenu = ContextMenuManager.getInstance()
.createContextMenuItems(ProgramInfoProxy.getInstance(), mProgram,
true);
subMenu.setText(Localizer.getLocalization(Localizer.I18N_PROGRAM));
popupMenu.add(subMenu);
return popupMenu;
}
private void handleEvent(MouseEvent e, boolean popupEvent) {