Examples of Workspace


Examples of org.gephi.project.api.Workspace

        });
    }

    private Workspace getPrecedentWorkspace(Workspace workspace) {
        ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
        Workspace prec = null;
        Workspace[] workspaces = pc.getCurrentProject().getLookup().lookup(WorkspaceProvider.class).getWorkspaces();
        for (Workspace w : workspaces) {
            if (w == workspace) {
                break;
            }
View Full Code Here

Examples of org.gephi.project.api.Workspace

        return prec;
    }

    private Workspace getNextWorkspace(Workspace workspace) {
        ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
        Workspace next = null;
        Workspace[] workspaces = pc.getCurrentProject().getLookup().lookup(WorkspaceProvider.class).getWorkspaces();
        for (Workspace w : workspaces) {
            if (next == workspace) {
                return w;
            }
View Full Code Here

Examples of org.gephi.project.api.Workspace

            }
            reportPanel.destroy();
            final Processor processor = reportPanel.getProcessor();

            //Project
            Workspace workspace = null;
            ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
            ProjectControllerUI pcui = Lookup.getDefault().lookup(ProjectControllerUI.class);
            if (pc.getCurrentProject() == null) {
                pcui.newProject();
                workspace = pc.getCurrentWorkspace();
View Full Code Here

Examples of org.gephi.project.api.Workspace

    private void finishGenerate(Container container) {

        ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
        ProjectControllerUI pcui = Lookup.getDefault().lookup(ProjectControllerUI.class);
        Workspace workspace;
        if (pc.getCurrentProject() == null) {
            pcui.newProject();
            workspace = pc.getCurrentWorkspace();
        } else {
            if (pc.getCurrentWorkspace() == null) {
View Full Code Here

Examples of org.gephi.project.api.Workspace

    private final DynamicModel dynamicModel;
    private final boolean dynamic;

    public DynamicAttributesHelper(Filter filter, Graph graph) {
        if (graph != null) {
            Workspace workspace = graph.getGraphModel().getWorkspace();
            FilterController filterController = Lookup.getDefault().lookup(FilterController.class);
            filterModel = filterController.getModel(workspace);

            DynamicController dynamicController = Lookup.getDefault().lookup(DynamicController.class);
            dynamicModel = dynamicController.getModel(workspace);
View Full Code Here

Examples of org.gephi.project.api.Workspace

    public IDGen getIDGen() {
        return iDGen;
    }

    private synchronized Dhns getCurrentDhns() {
        Workspace currentWorkspace = Lookup.getDefault().lookup(ProjectController.class).getCurrentWorkspace();
        if (currentWorkspace == null) {
            return null;
        }
        Dhns dhns = currentWorkspace.getLookup().lookup(Dhns.class);
        if (dhns == null) {
            dhns = newDhns(currentWorkspace);
        }
        return dhns;
    }
View Full Code Here

Examples of org.gephi.project.api.Workspace

        edgeTable.setShowEdgesNodesLabels(showEdgesNodesLabels);


        //Init
        ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
        Workspace workspace = pc.getCurrentWorkspace();
        if (workspace == null) {
            clearAll();
        } else {
            AttributeModel attributeModel = Lookup.getDefault().lookup(AttributeController.class).getModel();

            dataTablesModel = workspace.getLookup().lookup(DataTablesModel.class);
            if (dataTablesModel == null) {
                workspace.add(dataTablesModel = new DataTablesModel(attributeModel.getNodeTable(), attributeModel.getEdgeTable()));
            }
            nodeAvailableColumnsModel = dataTablesModel.getNodeAvailableColumnsModel();
            edgeAvailableColumnsModel = dataTablesModel.getEdgeAvailableColumnsModel();
            refreshAllOnce();
        }
View Full Code Here

Examples of org.gephi.project.api.Workspace

                }
                model = null;
            }
        });
        if (pc.getCurrentWorkspace() != null) {
            Workspace workspace = pc.getCurrentWorkspace();
            model = (FilterModelImpl) workspace.getLookup().lookup(FilterModel.class);
            if (model == null) {
                model = new FilterModelImpl(workspace);
                workspace.add(model);
            }
        }
    }
View Full Code Here

Examples of org.gephi.project.api.Workspace

                if (progressProvider != null) {
                    ticket = progressProvider.createTicket("Export to workspace", null);
                }
                Progress.start(ticket);
                ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
                Workspace newWorkspace = pc.duplicateWorkspace(pc.getCurrentWorkspace());
                GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getModel(newWorkspace);
                graphModel.clear();
                graphModel.pushFrom(graphView);
                Progress.finish(ticket);
                String workspaceName = newWorkspace.getLookup().lookup(WorkspaceInformation.class).getName();
                //StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(FilterControllerImpl.class, "FilterController.exportToNewWorkspace.status", workspaceName));
            }
        }, "Export filter to workspace").start();
    }
View Full Code Here

Examples of org.gephi.project.api.Workspace

                        throw new GephiFormatException("Gephi project file version must be at least 0.7");
                    }
                } else if ("project".equalsIgnoreCase(name)) {
                    info.setName(reader.getAttributeValue(null, "name"));
                } else if ("workspace".equalsIgnoreCase(name)) {
                    Workspace workspace = readWorkspace(reader);

                    //Current workspace
                    if (workspace.getLookup().lookup(WorkspaceInformationImpl.class).isOpen()) {
                        workspaces.setCurrentWorkspace(workspace);
                    }
                }
            } else if (eventType.equals(XMLStreamReader.END_ELEMENT)) {
                if ("project".equalsIgnoreCase(reader.getLocalName())) {
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.