Examples of ungroupNodes()


Examples of org.gephi.datalab.api.GraphElementsController.ungroupNodes()

        this.nodes = nodes;
    }

    public void execute() {
        GraphElementsController gec = Lookup.getDefault().lookup(GraphElementsController.class);
        gec.ungroupNodes(nodes);//At least 1 node is a group. And we don't have to check now every node because the ungroupNodes method does it for us.
    }

    public String getName() {
        if (nodes.length > 1) {
            return NbBundle.getMessage(Ungroup.class, "Ungroup.name.multiple");
View Full Code Here

Examples of org.gephi.datalab.api.GraphElementsController.ungroupNodes()

@ServiceProvider(service = GraphContextMenuItem.class)
public class Ungroup extends BasicItem {

    public void execute() {
        GraphElementsController gec = Lookup.getDefault().lookup(GraphElementsController.class);
        gec.ungroupNodes(nodes);
    }

    public String getName() {
        return NbBundle.getMessage(Ungroup.class, "GraphContextMenu_Ungroup");
    }
View Full Code Here

Examples of org.gephi.datalab.api.GraphElementsController.ungroupNodes()

        this.nodes = nodes;
    }

    public void execute() {
        GraphElementsController gec = Lookup.getDefault().lookup(GraphElementsController.class);
        gec.ungroupNodes(nodes);//At least 1 node is a group. And we don't have to check now every node because the ungroupNodes method does it for us.
    }

    public String getName() {
        if (nodes.length > 1) {
            return NbBundle.getMessage(Ungroup.class, "Ungroup.name.multiple");
View Full Code Here

Examples of org.gephi.graph.api.HierarchicalGraph.ungroupNodes()

    }

    public boolean ungroupNode(Node node) {
        if (canUngroupNode(node)) {
            HierarchicalGraph hg = getHierarchicalGraph();
            hg.ungroupNodes(node);
            return true;
        } else {
            return false;
        }
    }
View Full Code Here

Examples of org.gephi.graph.api.HierarchicalGraph.ungroupNodes()

            Node parent = hg.getParent(node);
            hg.readLock();
            int childrenCount = hg.getChildrenCount(parent);
            hg.readUnlock();
            if (childrenCount == 1) {
                hg.ungroupNodes(parent);//Break group when the last child is removed.
            } else {
                hg.removeFromGroup(node);
            }
            return true;
        } else {
View Full Code Here

Examples of org.gephi.graph.api.HierarchicalGraph.ungroupNodes()

                }
            }
            if (!validNodes.isEmpty()) {
                Node metaNode = graph.getParent(validNodes.get(0));
                if (metaNode != null) {
                    graph.ungroupNodes(metaNode);
                }
            }
        }
    }
View Full Code Here

Examples of org.gephi.graph.api.HierarchicalGraph.ungroupNodes()

    public void ungroupCluster(Cluster cluster) {
        GraphModel gm = Lookup.getDefault().lookup(GraphController.class).getModel();
        if (gm != null) {
            HierarchicalGraph graph = gm.getHierarchicalGraphVisible();
            graph.ungroupNodes(cluster.getMetaNode());
            cluster.setMetaNode(null);
        }
    }

    public boolean canGroup(Cluster cluster) {
View Full Code Here

Examples of org.gephi.graph.api.HierarchicalGraph.ungroupNodes()

    }

    public boolean ungroupNode(Node node) {
        if (canUngroupNode(node)) {
            HierarchicalGraph hg = getHierarchicalGraph();
            hg.ungroupNodes(node);
            return true;
        } else {
            return false;
        }
    }
View Full Code Here

Examples of org.gephi.graph.api.HierarchicalGraph.ungroupNodes()

            Node parent = hg.getParent(node);
            hg.readLock();
            int childrenCount = hg.getChildrenCount(parent);
            hg.readUnlock();
            if (childrenCount == 1) {
                hg.ungroupNodes(parent);//Break group when the last child is removed.
            } else {
                hg.removeFromGroup(node);
            }
            return true;
        } else {
View Full Code Here

Examples of org.gephi.graph.api.HierarchicalGraph.ungroupNodes()

    public void ungroupCluster(Cluster cluster) {
        GraphModel gm = Lookup.getDefault().lookup(GraphController.class).getModel();
        if (gm != null) {
            HierarchicalGraph graph = gm.getHierarchicalGraphVisible();
            graph.ungroupNodes(cluster.getMetaNode());
            cluster.setMetaNode(null);
        }
    }

    public boolean canGroup(Cluster cluster) {
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.