Examples of GraphController


Examples of org.gephi.graph.api.GraphController

    private LinkedList<Node> hub_list;
    private LinkedList<Node> auth_list;
    private HashMap<Node, Integer> indicies;

    public Hits() {
        GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
        if (graphController != null && graphController.getModel() != null) {
            useUndirected = graphController.getModel().isUndirected();
        }
    }
View Full Code Here

Examples of org.gephi.graph.api.GraphController

    private double[] pageranks;
    /** */
    private boolean isDirected;

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

Examples of org.gephi.graph.api.GraphController

    /** */
    private boolean isCanceled;
    private boolean isDirected;

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

Examples of org.gephi.graph.api.GraphController

    public void testSerialization() {
        ProjectController projectController = Lookup.getDefault().lookup(ProjectController.class);
        projectController.newProject();
        AttributeController attributeController = Lookup.getDefault().lookup(AttributeController.class);
        AttributeModel attributeModel = attributeController.getModel();
        GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
        GraphModel graphModel = graphController.getModel();

        StatisticsModelImpl model = new StatisticsModelImpl();

        ClusteringCoefficient clusteringCoefficient = new ClusteringCoefficient();
        ClusteringCoefficientUI clusteringCoefficientUI = new ClusteringCoefficientUI();
View Full Code Here

Examples of org.gephi.graph.api.GraphController

      return;
    }

    importController.process(container, new DefaultProcessor(), projectController.getCurrentWorkspace());

    GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
    graphModel = graphController.getModel();
  }
View Full Code Here

Examples of org.gephi.graph.api.GraphController

    private final FindToolUI ui = new FindToolUI();
   
    @Override
    public void select() {
        //Get current visible graph
        GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
        Graph graph = graphController.getModel().getGraphVisible();
       
        //Build the autocomplete data. A simple map from node's label
        graph.readLock();
        data = new HashMap<String, Node>();
        for (Node n : graph.getNodes()) {
View Full Code Here

Examples of org.gephi.graph.api.GraphController

                    new MouseClickEventListener() {

                        @Override
                        public void mouseClick(int[] positionViewport, float[] position3d) {
                            //Get current graph
                            GraphController gc = Lookup.getDefault().lookup(GraphController.class);
                            Graph graph = gc.getModel().getGraph();
                            GraphFactory factory = gc.getModel().factory();

                            //Add node
                            Node node = factory.newNode();
                            node.getNodeData().setX(position3d[0]);
                            node.getNodeData().setY(position3d[1]);
                            node.getNodeData().setSize(10f);
                            graph.addNode(node);
                        }
                    },
                    new NodeClickEventListener() {

                        @Override
                        public void clickNodes(Node[] nodes) {
                            //Get mouse position
                            float[] position3d = VizController.getInstance().getGraphIO().getMousePosition3d();

                            //Get current graph
                            GraphController gc = Lookup.getDefault().lookup(GraphController.class);
                            Graph graph = gc.getModel().getGraph();
                            GraphFactory factory = gc.getModel().factory();

                            //Add node
                            Node node = factory.newNode();
                            node.getNodeData().setX(position3d[0]);
                            node.getNodeData().setY(position3d[1]);
View Full Code Here

Examples of org.gephi.graph.api.GraphController

                statement.executeUpdate("drop table if exists edges");
                statement.executeUpdate("create table nodes (id string, label string)");
                statement.executeUpdate("create table edges (source string, target string, weight real)");

                //Get the current graph in the defined workspace
                GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
                GraphModel graphModel = graphController.getModel(workspace);
                Graph graph = graphModel.getGraphVisible();

                //Count the number of tasks (nodes + edges) and start the progress
                int tasks = graph.getNodeCount() + graph.getEdgeCount();
                Progress.start(progress, tasks);
View Full Code Here

Examples of org.gephi.graph.api.GraphController

public final class RemoveSelfLoopsAction implements ActionListener {

    @Override
    public void actionPerformed(ActionEvent e) {
        //Get the current graph model
        GraphController gc = Lookup.getDefault().lookup(GraphController.class);
        GraphModel graphModel = gc.getModel();
       
        if (graphModel != null) {
            //Remove self loops
            int removed = 0;
            Graph graph = graphModel.getGraph();
View Full Code Here

Examples of org.jboss.dependency.spi.graph.GraphController

   protected KernelControllerContext getControllerContext(final Object name, final ControllerState state)
   {
      try
      {
         Controller controller = kernel.getController();
         GraphController gc = (GraphController)controller;
         KernelControllerContext context = (KernelControllerContext)gc.getContext(name, state, Search.DEPTH);
         if (context == null)
            throw new IllegalStateException("Bean not found " + name + " at state " + state);
         return context;
      }
      catch (Throwable t)
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.