@Override protected void performExtraInitialisation() throws Exception { super.performExtraInitialisation(); getAssertedTree().setPopupMenuId(new PopupMenuId("[AssertedDataPropertyHierarchy]")); }
public JPopupMenu buildPopupMenu(final PopupMenuId menuId) { JPopupMenu popupMenu = new JPopupMenu(); parentChildMap.clear(); Map<String, MenuActionPlugin> idPluginMap = getPlugins(); for (MenuActionPlugin plugin : idPluginMap.values()) { MenuActionPlugin parent = idPluginMap.get(plugin.getParentId()); getChildren(parent).add(plugin); } // Should now have a hierarchy of plugins Collection<MenuActionPlugin> popupPlugins = getSortedList(getChildren(null)); String lastGroup = ""; for(MenuActionPlugin plugin : popupPlugins) { if(isPopupMenuItem(plugin)) { PopupMenuId popupMenuId = new PopupMenuId(plugin.getParentId()); if (popupMenuId.equals(menuId)) { if (!lastGroup.isEmpty() && !lastGroup.equals(plugin.getGroup())) { popupMenu.add(new JSeparator()); } lastGroup = plugin.getGroup(); addMenu(plugin, popupMenu); } } } return popupMenu; }
private static boolean isPopupMenuItem(MenuActionPlugin plugin) { String parentId = plugin.getParentId(); return parentId != null && PopupMenuId.isPopupMenuId(parentId); }
@Override protected void performExtraInitialisation() throws Exception { super.performExtraInitialisation(); getAssertedTree().setPopupMenuId(new PopupMenuId("[AssertedObjectPropertyHierarchy]")); }
@Override protected void performExtraInitialisation() throws Exception { super.performExtraInitialisation(); getAssertedTree().setPopupMenuId(new PopupMenuId("[AssertedObjectPropertyHierarchy]")); }
@Override protected void performExtraInitialisation() throws Exception { super.performExtraInitialisation(); getAssertedTree().setPopupMenuId(new PopupMenuId("[AssertedDataPropertyHierarchy]")); }
public void start() { editorKit.getOWLWorkspace().getOWLSelectionModel().addListener(this::handleSelectionChanged); handleSelectionChanged(); MenuBuilder menuBuilder = new MenuBuilder(editorKit); JPopupMenu popupMenu = menuBuilder.buildPopupMenu(new PopupMenuId(ENTITY_BANNER_MENU_ID)); view.setPopupMenu(popupMenu); }
getAssertedTree().setPopupMenuId(new PopupMenuId("[AssertedClassHierarchy]"));
getAssertedTree().setPopupMenuId(new PopupMenuId("[AssertedClassHierarchy]")); getAssertedTree().setCellRenderer(new ProtegeTreeNodeRenderer(getOWLEditorKit()));