Package org.gephi.graph.dhns.event

Examples of org.gephi.graph.dhns.event.NodeEvent


        if (node.level < treeStructure.getTreeHeight()) {
            business.expand(node);
        }
        graphVersion.incNodeAndEdgeVersion();
        dhns.writeUnlock();
        dhns.getEventManager().fireEvent(new NodeEvent(EventType.EXPAND, node, view));
    }
View Full Code Here


        if (node.level < treeStructure.getTreeHeight()) {
            business.retract(node);
        }
        graphVersion.incNodeAndEdgeVersion();
        dhns.writeUnlock();
        dhns.getEventManager().fireEvent(new NodeEvent(EventType.RETRACT, node, view));
    }
View Full Code Here

        node.parent = parentNode;
        business.addNode(node);
        dhns.getGraphStructure().addToDictionnary(node);
        graphVersion.incNodeVersion();
        dhns.writeUnlock();
        dhns.getEventManager().fireEvent(new NodeEvent(EventType.ADD_NODES, node, view));
    }
View Full Code Here

            }
            AbstractNode[] deletesNodes = business.deleteNode(node, view);
            graphVersion.incNodeAndEdgeVersion();
            dhns.writeUnlock();
            for (int i = 0; i < deletesNodes.length; i++) {
                dhns.getEventManager().fireEvent(new NodeEvent(EventType.REMOVE_NODES, deletesNodes[i], view));
            }

        } else {
            dhns.writeLock();
            AbstractNode[] deletesNodes = business.deleteNode(node, view);
            graphVersion.incNodeAndEdgeVersion();
            dhns.writeUnlock();
            for (int i = 0; i < deletesNodes.length; i++) {
                dhns.getEventManager().fireEvent(new NodeEvent(EventType.REMOVE_NODES, deletesNodes[i], view));
            }
        }
    }
View Full Code Here

            }
        }
        if (clearedNodes != null) {
            for (int i = 0; i < clearedNodes.length; i++) {
                if (clearedNodes[i] != null) {
                    dhns.getEventManager().fireEvent(new NodeEvent(EventType.REMOVE_NODES, clearedNodes[i], view));
                }
            }
        }
    }
View Full Code Here

    public void moveToGroup(AbstractNode node, AbstractNode nodeGroup) {
        dhns.writeLock();
        business.moveToGroup(node, nodeGroup);
        graphVersion.incNodeAndEdgeVersion();
        dhns.writeUnlock();
        dhns.getEventManager().fireEvent(new NodeEvent(EventType.MOVE_NODES, node, view));
    }
View Full Code Here

        AbstractNode group = dhns.factory().newNode(view.getViewId());
        business.group(group, nodes);
        graphVersion.incNodeAndEdgeVersion();
        dhns.getGraphStructure().addToDictionnary(group);
        dhns.writeUnlock();
        dhns.getEventManager().fireEvent(new NodeEvent(EventType.ADD_NODES, group, view));
        for (int i = 0; i < nodes.length; i++) {
            dhns.getEventManager().fireEvent(new NodeEvent(EventType.MOVE_NODES, nodes[i], view));
        }
        return group;
    }
View Full Code Here

    public void ungroup(AbstractNode nodeGroup) {
        dhns.writeLock();
        AbstractNode[] ungroupedNodes = business.ungroup(nodeGroup);
        graphVersion.incNodeAndEdgeVersion();
        dhns.writeUnlock();
        dhns.getEventManager().fireEvent(new NodeEvent(EventType.REMOVE_NODES, nodeGroup, view));
        for (int i = 0; i < ungroupedNodes.length; i++) {
            dhns.getEventManager().fireEvent(new NodeEvent(EventType.MOVE_NODES, ungroupedNodes[i], view));
        }
    }
View Full Code Here

                dhns.getGraphStructure().removeFromDictionnary(node);


                treeStructure.deleteOnlySelf(node);
                dhns.getEventManager().fireEvent(new NodeEvent(EventType.REMOVE_NODES, node, view));
            }

            for (AbstractNode node : nodesToKeep) {
                node.size = 0;
                node.parent = treeStructure.root;
View Full Code Here

TOP

Related Classes of org.gephi.graph.dhns.event.NodeEvent

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.