public void displayAsSingleNode(OWLEntity entity) { model.show(entity, graph.getFilterManager()); graph.performLayout(); }
/** * Sets the expansion menu options enabled/disabled flag based on the current state of the * node. If the node has already been expanded, everything is disabled. Otherwise, all the * non-filtered arc types are enabled. * @param node */ private void initNodeActionConditions(GraphNode node) { if (model.isExpanded(node)) { expandAction.setEnabled(false); for (Action action : expandBasedOnActions) { action.setEnabled(false); } } else { expandAction.setEnabled(true); for (Action action : expandBasedOnActions) { if(graph.getFilterManager().isArcTypeVisible(((CajunAction)action).getName())) { action.setEnabled(true); } else { action.setEnabled(false); } } } }
if(entities != null && entities.size() > 0) { for(OWLEntity owlEntity : entities) { model.show(owlEntity, graph.getFilterManager());
/** * Performs a search on the ontology with the given string. * * @param searchString The entered string to search on * @param searchMode The search type mode that determines how to match the searchString */ public int search(String searchString, String searchMode) { searchString = prepareSearchString(searchString, searchMode); for(GraphNode node : model.getAllNodes()) node.setSelected(false); Collection<GraphNode> matchingNodes = new ArrayList<GraphNode>(); Collection<? extends OWLEntity> searchResults = model.search(searchString, graph.getFilterManager()); for (OWLEntity owlEntity : searchResults) { GraphNode node = model.getNode(owlEntity); if(node != null) { matchingNodes.add(model.getNode(owlEntity)); } } graph.setSelectedNodes(matchingNodes); graph.setMatchingNodes(matchingNodes); graph.performLayout(); //model.recalculateArcTypes(); return searchResults.size(); }
private FilterPanel getNodeFilterPanel() { if (nodeFilterPanel == null) { Icon icon = ResourceHandler.getIcon("icon_node_filter.gif"); final FilterManager filterManager = graph.getFilterManager(); nodeFilterPanel = new FilterPanel("Node Types", icon, graph.getGraphNodeStyle()) { private static final long serialVersionUID = -2445793622682539920L;
model.show(owlClass, graph.getFilterManager());
private FilterPanel getArcFilterPanel() { if (arcFilterPanel == null) { Icon icon = ResourceHandler.getIcon("icon_arc_filter.gif"); final FilterManager filterManager = graph.getFilterManager(); arcFilterPanel = new FilterPanel("Arc Types", icon, graph.getGraphArcStyle()) { private static final long serialVersionUID = -1656466039034202473L;
}); this.graph.getFilterManager().addFilterChangedListener(new FilterChangedListener() { public void filtersChanged(FilterChangedEvent fce) {