Package org.gephi.project.api

Examples of org.gephi.project.api.ProjectInformation


        writer.writeEndElement();
        writer.writeEndElement();
    }

    public void writeProject(XMLStreamWriter writer, Project project) throws Exception {
        ProjectInformation info = project.getLookup().lookup(ProjectInformation.class);
        ProjectMetaData metaData = project.getLookup().lookup(ProjectMetaData.class);
        WorkspaceProviderImpl workspaces = project.getLookup().lookup(WorkspaceProviderImpl.class);

        writer.writeStartElement("project");
        writer.writeAttribute("name", info.getName());

        //MetaData
        writer.writeStartElement("metadata");

        writer.writeStartElement("title");
View Full Code Here


    public ProjectPropertiesEditor() {
        initComponents();
    }

    public void load(Project project) {
        ProjectInformation info = project.getLookup().lookup(ProjectInformation.class);
        if (info != null) {
            nameTextField.setText(info.getName());
            if (info.getFile() != null) {
                fileLabel.setText(info.getFile().getName());
            }
        }

        ProjectMetaData metaData = project.getLookup().lookup(ProjectMetaData.class);
        if (metaData != null) {
View Full Code Here

            descriptionTextArea.setText(metaData.getDescription());
        }
    }

    public void save(Project project) {
        ProjectInformation info = project.getLookup().lookup(ProjectInformation.class);
        if (info != null) {
            if (!nameTextField.getText().isEmpty() && !nameTextField.getText().equals(info.getName())) {
                ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
                pc.renameProject(project, nameTextField.getText());
            }
        }
        ProjectMetaData metaData = project.getLookup().lookup(ProjectMetaData.class);
View Full Code Here

    public ProjectPropertiesEditor() {
        initComponents();
    }

    public void load(Project project) {
        ProjectInformation info = project.getLookup().lookup(ProjectInformation.class);
        if (info != null) {
            nameTextField.setText(info.getName());
            if (info.getFile() != null) {
                fileLabel.setText(info.getFile().getName());
            }
        }

        ProjectMetaData metaData = project.getLookup().lookup(ProjectMetaData.class);
        if (metaData != null) {
View Full Code Here

            descriptionTextArea.setText(metaData.getDescription());
        }
    }

    public void save(Project project) {
        ProjectInformation info = project.getLookup().lookup(ProjectInformation.class);
        if (info != null) {
            if (!nameTextField.getText().isEmpty() && !nameTextField.getText().equals(info.getName())) {
                ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
                pc.renameProject(project, nameTextField.getText());
            }
        }
        ProjectMetaData metaData = project.getLookup().lookup(ProjectMetaData.class);
View Full Code Here

        writer.writeStartDocument("UTF-8", "1.0");
        writer.writeStartElement("projectFile");

        writeHeader(writer);

        ProjectInformation info = project.getLookup().lookup(ProjectInformation.class);
        ProjectMetaData metaData = project.getLookup().lookup(ProjectMetaData.class);

        //Start Project
        writer.writeStartElement("project");
        writer.writeAttribute("name", info.getName());
        writer.writeAttribute("ids", String.valueOf(((ProjectImpl) project).getWorkspaceIds()));

        //MetaData
        writer.writeStartElement("metadata");
View Full Code Here

TOP

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

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.