public void actionPerformed(ActionEvent e) {
favArr[0].removeFromBlackList(program);
}
});
return (new ActionMenu(action));
} else {
return null;
}
}
else {
ArrayList<Favorite> fromList = new ArrayList<Favorite>();
for (Favorite favorite : favArr) {
if(favorite.isOnBlackList(program)) {
fromList.add(favorite);
}
}
ContextMenuAction[] reactivateAction = new ContextMenuAction[fromList.size()];
for(int i = 0; i < fromList.size(); i++) {
final Favorite fav = fromList.get(i);
reactivateAction[i] = new ContextMenuAction(fav.getName());
reactivateAction[i].setSmallIcon(FavoritesPlugin.getFavoritesIcon(16));
reactivateAction[i].setActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fav.removeFromBlackList(program);
}
});
}
if(!fromList.isEmpty()) {
return new ActionMenu(mLocalizer.ellipsisMsg("removeFromBlackList", "Put this program back into"),
TVBrowserIcons.refresh(TVBrowserIcons.SIZE_SMALL), reactivateAction);
} else {
return null;
}
}