Package com.storedobject.chart
Class ActivityList.Activity
java.lang.Object
com.storedobject.chart.AbstractTask
com.storedobject.chart.ActivityList.ProjectActivity
com.storedobject.chart.ActivityList.Activity
-
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheck()Performs a validation check for the activity or activity group.createNext(String name, int duration) Create a new activity immediately following this activity.createNext(String name, int gap, int duration) Create a new activity following this activity.getColor()Get the color used when rendering.final doubleGet percentage completed.getGroup()Get theActivityList.ActivityGroupthis activity belongs to.booleanCheck if this task/activity is completed or not.final booleanIs this a milestone task?voidsetCompleted(double completed) Set completion percentage.toString()Methods inherited from class com.storedobject.chart.ActivityList.ProjectActivity
getDuration, getEnd, getName, renderStartMethods inherited from class com.storedobject.chart.AbstractTask
equals, getExtraFontSize, getExtraInfo, getFontSize, getId, getStart, hashCode, setColor, setExtraFontSize, setExtraInfo, setFontSize, setName
-
Method Details
-
createNext
Create a new activity following this activity.- Parameters:
name- Name of the new activity.gap- Gap between this activity and the new activity. (Must be greater than 0).duration- Duration of the new activity.- Returns:
- New activity.
-
createNext
Create a new activity immediately following this activity.- Parameters:
name- Name of the new activity.duration- Duration of the new activity.- Returns:
- New activity.
-
setCompleted
public void setCompleted(double completed) Set completion percentage.- Parameters:
completed- Percentage completed.
-
getCompleted
public final double getCompleted()Description copied from class:AbstractTaskGet percentage completed.- Specified by:
getCompletedin classAbstractTask- Returns:
- Percentage completed.
-
isMilestone
public final boolean isMilestone()Description copied from class:AbstractTaskIs this a milestone task? (Not applicable to activities).- Overrides:
isMilestonein classAbstractTask- Returns:
- True if the duration is zero.
-
getGroup
Get theActivityList.ActivityGroupthis activity belongs to.- Returns:
ActivityList.ActivityGroup.
-
isCompleted
public boolean isCompleted()Description copied from class:AbstractTaskCheck if this task/activity is completed or not.- Overrides:
isCompletedin classAbstractTask- Returns:
- True/false.
-
getColor
Description copied from class:AbstractTaskGet the color used when rendering.- Overrides:
getColorin classAbstractTask- Returns:
- Color.
-
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.
-
toString
-