boolean (String name) { for (final Sorter sorter : myModel.getSorters()) { if (sorter.getName().equals(name)) { if (!sorter.isVisible()) return true; } } for(TreeAction action: myActions) { if (action.getName().equals(name)) return true; } return false; }