Package ch.zhaw.tasklist.core
Class Project
- java.lang.Object
-
- ch.zhaw.tasklist.core.Wrapper<ProjectSource>
-
- ch.zhaw.tasklist.core.Project
-
public class Project extends Wrapper<ProjectSource>
Wrapper forProjectSource.
-
-
Constructor Summary
Constructors Constructor Description Project(ProjectSource source)Create projectProject(ProjectSource source, Project parenProject)Create project
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddSource(Source source)Adds a newSourceto the project.javafx.beans.property.ListProperty<Appointment>getAppointments()Get Wrapper forProjectSource.appointments.javafx.beans.property.ListProperty<Project>getChildren()Get Wrapper forProjectSource.children.javafx.beans.property.ListProperty<Note>getNotes()Get Wrapper forProjectSource.notes.ProjectgetParentProject()Get ParentProject.javafx.beans.property.ObjectProperty<Workspace>getWorkspace()Get Wrapper forProjectSource.workspace.booleanisRootProject()Return true if this is a root project.booleanremoveSource(Source source)Removes aSourcefrom the project.protected static java.util.List<ProjectSource>unwrap(java.util.List<Project> list)booleanupdateSource(Source source)Updates aSourcein the project.protected static javafx.collections.ObservableList<Project>wrap(java.util.List<ProjectSource> list, Project parent)
-
-
-
Constructor Detail
-
Project
public Project(ProjectSource source)
Create project- Parameters:
source-
-
Project
public Project(ProjectSource source, Project parenProject)
Create project- Parameters:
source-parenProject-
-
-
Method Detail
-
wrap
protected static javafx.collections.ObservableList<Project> wrap(java.util.List<ProjectSource> list, Project parent)
- Parameters:
list-ListofProjectSource- Returns:
ObservableListofProject
-
unwrap
protected static java.util.List<ProjectSource> unwrap(java.util.List<Project> list)
- Parameters:
list-ListofProject- Returns:
ListofProjectSource
-
getParentProject
public Project getParentProject()
Get ParentProject.- Returns:
- parentProject
-
isRootProject
public boolean isRootProject()
Return true if this is a root project.- Returns:
- true if this is a root project, false otherwise
-
getChildren
public javafx.beans.property.ListProperty<Project> getChildren()
Get Wrapper forProjectSource.children.- Returns:
- the wrapper
-
getAppointments
public javafx.beans.property.ListProperty<Appointment> getAppointments()
Get Wrapper forProjectSource.appointments.- Returns:
- the wrapper
-
getNotes
public javafx.beans.property.ListProperty<Note> getNotes()
Get Wrapper forProjectSource.notes.- Returns:
- the wrapper
-
getWorkspace
public javafx.beans.property.ObjectProperty<Workspace> getWorkspace()
Get Wrapper forProjectSource.workspace.- Returns:
- the wrapper
-
addSource
public boolean addSource(Source source)
Adds a newSourceto the project.- Parameters:
source- the source to add- Returns:
- true if the source could be added
-
updateSource
public boolean updateSource(Source source)
Updates aSourcein the project.- Parameters:
source- the source to update- Returns:
- true if the source could be updated
-
-