Package org.gephi.graph.api

Examples of org.gephi.graph.api.GraphController


                    shortestPathPanel.setResult("");
                    shortestPathPanel.setStatus(NbBundle.getMessage(ShortestPath.class, "ShortestPath.status2"));
                } else if (n != sourceNode) {
                    color = shortestPathPanel.getColor();
                    Node targetNode = n;
                    GraphController gc = Lookup.getDefault().lookup(GraphController.class);
                    GraphModel gm = gc.getGraphModel();

                    AbstractShortestPathAlgorithm algorithm;
                    if (gm.isDirected()) {
                        algorithm = new BellmanFordShortestPathAlgorithm(gm.getDirectedGraphVisible(), sourceNode);
                    } else {
View Full Code Here


        if (container.getSource() != null) {
            pc.setSource(workspace, container.getSource());
        }

        //Architecture
        GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
        GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel();

        Graph graph = graphModel.getGraph();;
        GraphFactory factory = graphModel.factory();

        //Attributes - Creates columns for properties
        attributeModel = graphController.getAttributeModel();
        flushColumns();

        //Dynamic
//        if (container.getTimeFormat() != null) {
//            DynamicController dynamicController = Lookup.getDefault().lookup(DynamicController.class);
View Full Code Here

    private int N;
    private double[] nodeClustering;
    private int totalTriangles;

    public ClusteringCoefficient() {
        GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
        if (graphController != null && graphController.getGraphModel() != null) {
            isDirected = graphController.getGraphModel().isDirected();
        }
    }
View Full Code Here

        if (container.getSource() != null) {
            pc.setSource(workspace, container.getSource());
        }

        //Architecture
        GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
        GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel();

        Graph graph = graphModel.getGraph();
        GraphFactory factory = graphModel.factory();

        //Attributes - Creates columns for properties
        attributeModel = graphController.getAttributeModel();
        flushColumns();

        //Dynamic
//        if (container.getTimeFormat() != null) {
//            DynamicController dynamicController = Lookup.getDefault().lookup(DynamicController.class);
View Full Code Here

        executor.setDefaultErrorHandler(errorHandler);
    }

    public void clusterize(final Clusterer clusterer) {
        //Get Graph
        GraphController gc = Lookup.getDefault().lookup(GraphController.class);
        final GraphModel graphModel = gc.getModel();

        //Model
        final ClusteringModel model = Lookup.getDefault().lookup(ProjectController.class).getCurrentWorkspace().getLookup().lookup(ClusteringModel.class);

        //LongTask
View Full Code Here

    private float minZ;
    private float maxZ;

    @Override
    public boolean execute() {
        GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
        graphModel = graphController.getGraphModel(workspace);
        Graph graph = null;
        if (exportVisible) {
            graph = graphModel.getGraphVisible();
        } else {
            graph = graphModel.getGraph();
View Full Code Here

    @Override
    public void execute(Statistics statistics) {
        if (statistics instanceof DynamicStatistics) {
            executeDynamic((DynamicStatistics) statistics, null);
        } else {
            GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
            GraphModel graphModel = graphController.getGraphModel();
            AttributeModel attributeModel = graphController.getAttributeModel();
            statistics.execute(graphModel, attributeModel);
            model.addReport(statistics);
        }
    }
View Full Code Here

            model.addReport(statistics);
        }
    }

    private void executeDynamic(DynamicStatistics statistics, DynamicLongTask dynamicLongTask) {
        GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
        GraphModel graphModel = graphController.getGraphModel();
        AttributeModel attributeModel = graphController.getAttributeModel();

        double window = statistics.getWindow();
        double tick = statistics.getTick();
        Interval bounds = statistics.getBounds();
        if (bounds == null) {
View Full Code Here

        listeners[0] = new MouseClickEventListener() {
            @Override
            public void mouseClick(int[] positionViewport, float[] position3d) {
                color = nodePencilPanel.getColor();
                size = nodePencilPanel.getNodeSize();
                GraphController gc = Lookup.getDefault().lookup(GraphController.class);
                GraphModel gm = gc.getGraphModel();
                Graph graph = gm.getGraph();
                Node node = gm.factory().newNode();
                node.setX(position3d[0]);
                node.setY(position3d[1]);
                node.setSize(size);
View Full Code Here

TOP

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

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.