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 boolean
addSource(Source source)
Adds a newSource
to 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
.Project
getParentProject()
Get ParentProject.javafx.beans.property.ObjectProperty<Workspace>
getWorkspace()
Get Wrapper forProjectSource.workspace
.boolean
isRootProject()
Return true if this is a root project.boolean
removeSource(Source source)
Removes aSource
from the project.protected static java.util.List<ProjectSource>
unwrap(java.util.List<Project> list)
boolean
updateSource(Source source)
Updates aSource
in 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
-List
ofProjectSource
- Returns:
ObservableList
ofProject
-
unwrap
protected static java.util.List<ProjectSource> unwrap(java.util.List<Project> list)
- Parameters:
list
-List
ofProject
- Returns:
List
ofProjectSource
-
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 newSource
to the project.- Parameters:
source
- the source to add- Returns:
- true if the source could be added
-
updateSource
public boolean updateSource(Source source)
Updates aSource
in the project.- Parameters:
source
- the source to update- Returns:
- true if the source could be updated
-
-