Package com.storedobject.chart
Class ActivityList.ActivityGroup
java.lang.Object
com.storedobject.chart.AbstractTask
com.storedobject.chart.ActivityList.ProjectActivity
com.storedobject.chart.ActivityList.ActivityGroup
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
check()
Performs a validation check for the activity or activity group.createActivity
(String name, LocalDateTime start, int duration) Create and add aActivityList.Activity
to this group.createActivity
(String name, LocalDateTime start, LocalDateTime end) Create and add aActivityList.Activity
to this group.final ActivityList.Activity
getActivity
(int activityIndex) Get anActivityList.Activity
from this group.final int
Get theActivityList.Activity
count belonging to this group.getColor()
Get the color used when rendering.double
Get percentage completed.final int
Get the duration.final LocalDateTime
getStart()
Get the start.boolean
Check if this task/activity is completed or not.Methods inherited from class com.storedobject.chart.ActivityList.ProjectActivity
getEnd, getName, renderStart
Methods inherited from class com.storedobject.chart.AbstractTask
equals, getExtraFontSize, getExtraInfo, getFontSize, getId, hashCode, isMilestone, setColor, setExtraFontSize, setExtraInfo, setFontSize, setName
-
Method Details
-
createActivity
Create and add aActivityList.Activity
to this group.- Parameters:
name
- Name of the activity.start
- Start.duration
- Duration of theActivityList.Activity
. (Should be grater than 0).- Returns:
- Activity created.
-
createActivity
Create and add aActivityList.Activity
to this group.- Parameters:
name
- Name of the activity.start
- Start.end
- End.- Returns:
- Activity created.
-
getColor
Description copied from class:AbstractTask
Get the color used when rendering.- Overrides:
getColor
in classAbstractTask
- Returns:
- Color.
-
getDuration
public final int getDuration()Description copied from class:ActivityList.ProjectActivity
Get the duration.- Overrides:
getDuration
in classActivityList.ProjectActivity
- Returns:
- Duration (in
AbstractProject.getDurationType()
).
-
getStart
Description copied from class:AbstractTask
Get the start.- Overrides:
getStart
in classAbstractTask
- Returns:
- Start.
-
getActivity
Get anActivityList.Activity
from this group.- Parameters:
activityIndex
- Index of the activity to be retrieved.- Returns:
ActivityList.Activity
.
-
getActivityCount
public final int getActivityCount()Get theActivityList.Activity
count belonging to this group.- Returns:
- Activity count.
-
isCompleted
public boolean isCompleted()Description copied from class:AbstractTask
Check if this task/activity is completed or not.- Overrides:
isCompleted
in classAbstractTask
- Returns:
- True/false.
-
getCompleted
public double getCompleted()Description copied from class:AbstractTask
Get percentage completed.- Specified by:
getCompleted
in classAbstractTask
- Returns:
- Percentage completed.
-
check
Description copied from class:ActivityList.ProjectActivity
Performs a validation check for the activity or activity group. This method needs to be implemented by subclasses to provide the specific validation logic.- Specified by:
check
in classActivityList.ProjectActivity
- Throws:
ChartException
- if any validation error occurs during the check.
-