Package ru.spbu.math.ontologycomparison.zhukova.visualisation.ui.tree

Examples of ru.spbu.math.ontologycomparison.zhukova.visualisation.ui.tree.CheckNode


        this.title = title;
        this.roots = roots;
    }

    public IPair<TreeModel, SetHashTable<IOntologyConcept,CheckNode>> buildTree(boolean unmappedNoSynsetVisible, boolean unmappedWithSynsetVisible) {
        CheckNode root = new CheckNode(title, true, Color.BLACK);
        SetHashTable<IOntologyConcept, CheckNode> conceptToNodeMap = new SetHashTable<IOntologyConcept, CheckNode>();
        for (IOntologyConcept parent : this.roots) {
            CheckNode parentNode = new CheckNode(parent, isSelected(parent.hasMappedConcepts(), parent.hasSynsets(), unmappedNoSynsetVisible, unmappedWithSynsetVisible), getColor(parent.hasMappedConcepts(), parent.hasSynsets()));
            conceptToNodeMap.insert(parent, parentNode);
            addChildrenRecursively(parent, parentNode, conceptToNodeMap, unmappedNoSynsetVisible, unmappedWithSynsetVisible);
            root.add(parentNode);
        }
        final TreeModel tree = new DefaultTreeModel(root);
View Full Code Here


        }
    }

    private void addChildrenRecursively(IOntologyConcept parent, CheckNode parentNode, SetHashTable<IOntologyConcept, CheckNode> conceptToNodeMap, boolean unmappedNoSynsetVisible, boolean unmappedWithSynsetVisible) {
        for (IOntologyConcept child : parent.getChildren()) {
            CheckNode childNode = new CheckNode(child, isSelected(child.hasMappedConcepts(), child.hasSynsets(), unmappedNoSynsetVisible, unmappedWithSynsetVisible), getColor(child.hasMappedConcepts(), child.hasSynsets()));
            conceptToNodeMap.insert(child, childNode);
            addChildrenRecursively(child, childNode, conceptToNodeMap, unmappedNoSynsetVisible, unmappedWithSynsetVisible);
            parentNode.add(childNode);
        }
    }
View Full Code Here

    }

    public void visitRow(boolean select, int selectionMode, boolean hide) {
        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;
View Full Code Here

TOP

Related Classes of ru.spbu.math.ontologycomparison.zhukova.visualisation.ui.tree.CheckNode

Copyright © 2018 www.massapicom. 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.