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 voidcheck()Performs a validation check for the activity or activity group.createActivity(String name, LocalDateTime start, int duration) Create and add aActivityList.Activityto this group.createActivity(String name, LocalDateTime start, LocalDateTime end) Create and add aActivityList.Activityto this group.final ActivityList.ActivitygetActivity(int activityIndex) Get anActivityList.Activityfrom this group.final intGet theActivityList.Activitycount belonging to this group.getColor()Get the color used when rendering.doubleGet percentage completed.final intGet the duration.final LocalDateTimegetStart()Get the start.booleanCheck if this task/activity is completed or not.Methods inherited from class com.storedobject.chart.ActivityList.ProjectActivity
getEnd, getName, renderStartMethods 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.Activityto 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.Activityto this group.- Parameters:
name- Name of the activity.start- Start.end- End.- Returns:
- Activity created.
-
getColor
Description copied from class:AbstractTaskGet the color used when rendering.- Overrides:
getColorin classAbstractTask- Returns:
- Color.
-
getDuration
public final int getDuration()Description copied from class:ActivityList.ProjectActivityGet the duration.- Overrides:
getDurationin classActivityList.ProjectActivity- Returns:
- Duration (in
AbstractProject.getDurationType()).
-
getStart
Description copied from class:AbstractTaskGet the start.- Overrides:
getStartin classAbstractTask- Returns:
- Start.
-
getActivity
Get anActivityList.Activityfrom this group.- Parameters:
activityIndex- Index of the activity to be retrieved.- Returns:
ActivityList.Activity.
-
getActivityCount
public final int getActivityCount()Get theActivityList.Activitycount belonging to this group.- Returns:
- Activity count.
-
isCompleted
public boolean isCompleted()Description copied from class:AbstractTaskCheck if this task/activity is completed or not.- Overrides:
isCompletedin classAbstractTask- Returns:
- True/false.
-
getCompleted
public double getCompleted()Description copied from class:AbstractTaskGet percentage completed.- Specified by:
getCompletedin classAbstractTask- Returns:
- Percentage completed.
-
check
Description copied from class:ActivityList.ProjectActivityPerforms 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:
checkin classActivityList.ProjectActivity- Throws:
ChartException- if any validation error occurs during the check.
-