private static Icon getMenuIcon(EntityType type) {
return EntityIcons.forType(type).getDefaultIcon(Size.SMALL);
}
private void addEmailMenu(JMenu parent) {
KongaMenu menu = new KongaMenu("&Email", getMenuIcon(EntityType.EmailMessage));
SuccessEmailSelector selector = new SuccessEmailSelector(controller, node);
menu.add(new OpenSuccessFailureSelectorDialogAction(selector));
menu.add(new CreateNewEmailAction(controller, node, RouteType.SUCCESS));
menu.addSeparator();
menu.add(new RemoveSuccessEmailAction(controller, node));
parent.add(menu);
}