Package org.gephi.graph.api

Examples of org.gephi.graph.api.GraphController


    public GraphViewObserver(RankingModelImpl rankingModel) {
        timer = new Timer("RankingGraphViewObserver", true);
        model = rankingModel;

        GraphController graphController = Lookup.getDefault().lookup(GraphController.class);

        graphModel = graphController.getGraphModel(rankingModel.getWorkspace());
        viewHash = graphModel.getVisibleView().hashCode();
    }
View Full Code Here


    //Buffer
    private Writer writer;

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

    public ColumnObserver(RankingModelImpl rankingModel) {
        timer = new Timer("RankingColumnObserver", true);
        model = rankingModel;

        GraphController graphController = Lookup.getDefault().lookup(GraphController.class);

        attributeModel = graphController.getAttributeModel(rankingModel.getWorkspace());
        nodeTableHash = attributeModel.getNodeTable().hashCode();
        edgeTableHash = attributeModel.getEdgeTable().hashCode();
    }
View Full Code Here

            public void initialize(Workspace workspace) {
            }

            @Override
            public void select(Workspace workspace) {
                GraphController gc = Lookup.getDefault().lookup(GraphController.class);
                GraphModel gm = gc.getGraphModel(workspace);
                contextPanel.refreshModel(gm);
            }

            @Override
            public void unselect(Workspace workspace) {
View Full Code Here

    private double density;
    /** */
    private boolean isDirected;

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

                    } else {
                        gradientColors = colors = heatMapPanel.getGradientColors();
                        gradientPositions = positions = heatMapPanel.getGradientPositions();
                        dontPaintUnreachable = heatMapPanel.isDontPaintUnreachable();
                    }
                    GraphController gc = Lookup.getDefault().lookup(GraphController.class);

                    AbstractShortestPathAlgorithm algorithm;
                    if (gc.getGraphModel().isDirected()) {
                        DirectedGraph graph = gc.getGraphModel().getDirectedGraphVisible();
                        algorithm = new BellmanFordShortestPathAlgorithm(graph, n);
                        algorithm.compute();
                    } else {
                        Graph graph = gc.getGraphModel().getGraphVisible();
                        algorithm = new DijkstraShortestPathAlgorithm(graph, n);
                        algorithm.compute();
                    }

                    //Color
View Full Code Here

    private int stronglyCount;
    private int[] componentsSize;
    int count;

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

        });
    }

    private void updatePanel() {
        if (edgePencilPanel != null) {
            GraphController gc = Lookup.getDefault().lookup(GraphController.class);
            if (gc.getGraphModel() != null) {
                edgePencilPanel.setType(gc.getGraphModel().isDirected() || gc.getGraphModel().isMixed());
            }
            sourceNode = null;
            edgePencilPanel.setStatus(NbBundle.getMessage(EdgePencil.class, "EdgePencil.status1"));
        }
    }
View Full Code Here

        return exportVisible;
    }

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

    private double[] hubs;
    private boolean useUndirected;
    private double epsilon = 0.0001;

    public Hits() {
        GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
        if (graphController != null && graphController.getGraphModel() != null) {
            useUndirected = graphController.getGraphModel().isUndirected();
        }
    }
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.