Package org.gephi.project.impl
Class ProjectsImpl
- java.lang.Object
-
- org.gephi.project.impl.ProjectsImpl
-
-
Field Summary
Fields Modifier and Type Field Description private ProjectImpl
currentProject
private List<ProjectImpl>
projects
-
Constructor Summary
Constructors Constructor Description ProjectsImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOrReplaceProject(ProjectImpl project)
void
addProject(ProjectImpl project)
void
closeCurrentProject()
boolean
containsProject(Project project)
private ProjectImpl
findProjectByFile(File file)
ProjectImpl
getCurrentProject()
Returns the current project..ProjectImpl
getProjectByIdentifier(String identifier)
ProjectImpl[]
getProjects()
Returns an array of all projects.boolean
hasCurrentProject()
Returns true if a project is selected.void
loadProjects(File file)
protected String
nextUntitledProjectName()
void
removeProject(ProjectImpl project)
void
saveProjects(File file)
void
setCurrentProject(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:Projects
Returns an array of all projects.- Specified by:
getProjects
in interfaceProjects
- Returns:
- project array
-
getCurrentProject
public ProjectImpl getCurrentProject()
Description copied from interface:Projects
Returns the current project..- Specified by:
getCurrentProject
in interfaceProjects
- Returns:
- current project or
null
if missing
-
setCurrentProject
public void setCurrentProject(ProjectImpl currentProject)
-
hasCurrentProject
public boolean hasCurrentProject()
Description copied from interface:Projects
Returns true if a project is selected.- Specified by:
hasCurrentProject
in 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:
saveProjects
in interfaceProjects
- Throws:
IOException
-
loadProjects
public void loadProjects(File file) throws IOException
- Specified by:
loadProjects
in interfaceProjects
- Throws:
IOException
-
-