Package org.gephi.graph.api

Examples of org.gephi.graph.api.Model


        return (obj.getSource().getModel().getCameraDistance() + obj.getTarget().getModel().getCameraDistance()) / 2f;
    }

    @Override
    public boolean isAutoSelected() {
        Model nSource = obj.getSource().getModel();
        Model nTarget = obj.getTarget().getModel();
        if (nSource != null && nTarget != null) {
            return obj.getSource().getModel().isSelected() || obj.getTarget().getModel().isSelected();
        }
        return false;
    }
View Full Code Here


            }
        }
    }

    public void centerOnNode(Node node) {
        Model model = node.getNodeData().getModel();
        if (model != null) {
            VizController.getInstance().getGraphIO().centerOnCoordinate(model.getObj().x(), model.getObj().y(), model.getObj().z() + model.getObj().getSize() * 8);
            engine.getScheduler().requireUpdateVisible();
        }
    }
View Full Code Here

        nodeIterable = graph.getNodes();


        for (Node node : nodeIterable) {

            Model obj = node.getNodeData().getModel();
            if (obj == null) {
                //Model is null, ADD
                obj = nodeInit.initModel(node.getNodeData());
                engine.addObject(AbstractEngine.CLASS_NODE, (ModelImpl) obj);
            } else if (!obj.isValid()) {
                engine.addObject(AbstractEngine.CLASS_NODE, (ModelImpl) obj);
            }
            obj.setCacheMarker(cacheMarker);

            //Modeaction
            if (modeManager.getMode().equals(ModeManager.AVAILABLE_MODES.HIGHLIGHT)) {
                ModelImpl impl = (ModelImpl) obj;
//                if (!node.isVisible()) {
View Full Code Here

            Node[] nodes = graph.getNodes().toArray();
            for (Node n : nodes) {
                Node parent = graph.getParent(n);
                if (parent != null) {
                    Group group = (Group) parent;
                    Model hullModel = group.getGroupData().getHullModel();
                    if (hullModel != null && hullModel.isCacheMatching(cacheMarker)) {
                        ConvexHull hull = (ConvexHull) hullModel.getObj();
                        hull.addNode(n);
                        hull.setModel(hullModel);
                    } else if (hullModel != null) {
                        //Its not the first time the hull exist
                        ConvexHullModel model = (ConvexHullModel) hullModel;
                        model.setScale(1f);
                        hullModel.setCacheMarker(cacheMarker);
                        hulls.add((ModelImpl) hullModel);
                    } else {
                        ConvexHull ch = new ConvexHull();
                        ch.setMetaNode(parent);
                        ch.addNode(n);
View Full Code Here

TOP

Related Classes of org.gephi.graph.api.Model

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.