Package org.gephi.project.api

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


    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

    @Override
    public void exportFile(File file, Exporter fileExporter) throws IOException {
        if (fileExporter.getWorkspace() == null) {
            ProjectController projectController = Lookup.getDefault().lookup(ProjectController.class);
            Workspace workspace = projectController.getCurrentWorkspace();
            fileExporter.setWorkspace(workspace);
        }
        if (fileExporter instanceof ByteExporter) {
            OutputStream stream = new BufferedOutputStream(new FileOutputStream(file));
            ((ByteExporter) fileExporter).setOutputStream(stream);
View Full Code Here

    @Override
    public void exportStream(OutputStream stream, ByteExporter byteExporter) {
        if (byteExporter.getWorkspace() == null) {
            ProjectController projectController = Lookup.getDefault().lookup(ProjectController.class);
            Workspace workspace = projectController.getCurrentWorkspace();
            byteExporter.setWorkspace(workspace);
        }
        byteExporter.setOutputStream(stream);
        try {
            byteExporter.execute();
View Full Code Here

    @Override
    public void exportWriter(Writer writer, CharacterExporter characterExporter) {
        if (characterExporter.getWorkspace() == null) {
            ProjectController projectController = Lookup.getDefault().lookup(ProjectController.class);
            Workspace workspace = projectController.getCurrentWorkspace();
            characterExporter.setWorkspace(workspace);
        }
        characterExporter.setWriter(writer);
        try {
            characterExporter.execute();
View Full Code Here

            n = nl.item(0);

        }
        ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
        pc.newProject();
        Workspace workspace = pc.getCurrentWorkspace();
        Container container = Lookup.getDefault().lookup(ContainerFactory.class).newContainer();
        ImportController importController = Lookup.getDefault().lookup(ImportController.class);
        importController.process(container, new DefaultProcessor(), workspace);

        //Get a graph model - it exists because we have a workspace
View Full Code Here

            n = nl.item(0);

        }
        ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
        pc.newProject();
        Workspace workspace = pc.getCurrentWorkspace();
        Container container = Lookup.getDefault().lookup(ContainerFactory.class).newContainer();
        ImportController importController = Lookup.getDefault().lookup(ImportController.class);
        importController.process(container, new DefaultProcessor(), workspace);

        //Get a graph model - it exists because we have a workspace
View Full Code Here

TOP

Related Classes of org.gephi.project.api.Workspace

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.