Examples of IGraphModel


Examples of ru.spbu.math.ontologycomparison.zhukova.visualisation.model.IGraphModel

        TreePath treePath = tree.getPathForRow(row);
        if (treePath != null && graphPane != null) {
            CheckNode node = (CheckNode) treePath.getLastPathComponent();
            ArrayList<CheckNode> nodes = new ArrayList<CheckNode>();
            node.setSelected(select, selectionMode, nodes);
            IGraphModel graphModel = graphPane.getGraphModel();
            for (CheckNode checkNode : nodes) {
                Object object = checkNode.getUserObject();
                if (!(object instanceof IOntologyConcept)) {
                    continue;
                }
                IOntologyConcept ontologyConcept = (IOntologyConcept) object;
                SimpleVertex simpleVertex = graphModel.getVertexByConcept(ontologyConcept);
                if (simpleVertex != null) {
                    SuperVertex superVertex = simpleVertex.getSuperVertex();
                    IVertex vertex = superVertex == null ? simpleVertex : superVertex;
                    if (hide) {
                        graphModel.removeVertex(vertex);
                    } else {
                        graphModel.addVertex(vertex);
                    }
                    for (IOntologyConcept similarConcept : ontologyConcept.getSimilarConcepts()) {
                        Set<CheckNode> similarNodes = conceptToCheckNodeMap.get(similarConcept);
                        if (similarNodes != null) {
                            for (CheckNode similar : similarNodes) {
View Full Code Here

Examples of ru.spbu.math.ontologycomparison.zhukova.visualisation.model.IGraphModel

        showUnmappedConceptsCheckBox.setSelected(false);
        showUnmappedConceptsCheckBox.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                final boolean showUnmapped = showUnmappedConceptsCheckBox.isSelected();
                IGraphModel graphModel = Main.this.getGraphModel();
                if (graphModel != null) {
                    graphModel.showNoParentVertices(showUnmapped);
                }
            }
        });
        checkBoxPanel.add(showUnmappedConceptsCheckBox);

        this.showSingleSynsetVertexCheckBox = new JCheckBox("Show concepts mapped to WordNet only");
        showSingleSynsetVertexCheckBox.setSelected(false);
        showSingleSynsetVertexCheckBox.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                final boolean showSingleSynsetVertex = showSingleSynsetVertexCheckBox.isSelected();
                IGraphModel graphModel = Main.this.getGraphModel();
                if (graphModel != null) {
                    graphModel.showSingleVerticesWithSuchNamedParent(showSingleSynsetVertex, SimilarityReason.WORDNET.name());
                }
            }
        });
        checkBoxPanel.add(showSingleSynsetVertexCheckBox);
        onlyOuterNodesSelection = new JCheckBox("Select only outer nodes", true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.