Package org.gephi.project.impl
Class ProjectsImpl
- java.lang.Object
-
- org.gephi.project.impl.ProjectsImpl
-
-
Field Summary
Fields Modifier and Type Field Description private ProjectImplcurrentProjectprivate List<ProjectImpl>projects
-
Constructor Summary
Constructors Constructor Description ProjectsImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOrReplaceProject(ProjectImpl project)voidaddProject(ProjectImpl project)voidcloseCurrentProject()booleancontainsProject(Project project)private ProjectImplfindProjectByFile(File file)ProjectImplgetCurrentProject()Returns the current project..ProjectImplgetProjectByIdentifier(String identifier)ProjectImpl[]getProjects()Returns an array of all projects.booleanhasCurrentProject()Returns true if a project is selected.voidloadProjects(File file)protected StringnextUntitledProjectName()voidremoveProject(ProjectImpl project)voidsaveProjects(File file)voidsetCurrentProject(ProjectImpl currentProject)
-
-
-
Field Detail
-
projects
private final List<ProjectImpl> projects
-
currentProject
private ProjectImpl currentProject
-
-
Method Detail
-
addProject
public void addProject(ProjectImpl project)
-
containsProject
public boolean containsProject(Project project)
-
getProjectByIdentifier
public ProjectImpl getProjectByIdentifier(String identifier)
-
addOrReplaceProject
public void addOrReplaceProject(ProjectImpl project)
-
findProjectByFile
private ProjectImpl findProjectByFile(File file)
-
removeProject
public void removeProject(ProjectImpl project)
-
getProjects
public ProjectImpl[] getProjects()
Description copied from interface:ProjectsReturns an array of all projects.- Specified by:
getProjectsin interfaceProjects- Returns:
- project array
-
getCurrentProject
public ProjectImpl getCurrentProject()
Description copied from interface:ProjectsReturns the current project..- Specified by:
getCurrentProjectin interfaceProjects- Returns:
- current project or
nullif missing
-
setCurrentProject
public void setCurrentProject(ProjectImpl currentProject)
-
hasCurrentProject
public boolean hasCurrentProject()
Description copied from interface:ProjectsReturns true if a project is selected.- Specified by:
hasCurrentProjectin interfaceProjects- Returns:
- true if current project, false otherwise
-
closeCurrentProject
public void closeCurrentProject()
-
nextUntitledProjectName
protected String nextUntitledProjectName()
-
saveProjects
public void saveProjects(File file) throws IOException
- Specified by:
saveProjectsin interfaceProjects- Throws:
IOException
-
loadProjects
public void loadProjects(File file) throws IOException
- Specified by:
loadProjectsin interfaceProjects- Throws:
IOException
-
-