private static Icon getMenuIcon(EntityType type) {
return EntityIcons.forType(type).getDefaultIcon(Size.SMALL);
}
private void addEmailMenu(JMenu parent) {
KongaMenu opMenu = new KongaMenu("&Email", getMenuIcon(EntityType.EmailMessage));
FailureEmailSelector selector = new FailureEmailSelector(controller, node);
opMenu.add(new OpenSuccessFailureSelectorDialogAction(selector));
Action createNew = new CreateNewEmailAction(controller, node, RouteType.FAILURE);
opMenu.add(createNew);
opMenu.add(new RemoveFailureEmailAction(controller, node));
parent.add(opMenu);
}