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 void
check()
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 double
Get percentage completed.getGroup()
Get theActivityList.ActivityGroup
this activity belongs to.boolean
Check if this task/activity is completed or not.final boolean
Is this a milestone task?void
setCompleted
(double completed) Set completion percentage.toString()
Methods inherited from class com.storedobject.chart.ActivityList.ProjectActivity
getDuration, getEnd, getName, renderStart
Methods 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:AbstractTask
Get percentage completed.- Specified by:
getCompleted
in classAbstractTask
- Returns:
- Percentage completed.
-
isMilestone
public final boolean isMilestone()Description copied from class:AbstractTask
Is this a milestone task? (Not applicable to activities).- Overrides:
isMilestone
in classAbstractTask
- Returns:
- True if duration is zero.
-
getGroup
Get theActivityList.ActivityGroup
this activity belongs to.- Returns:
ActivityList.ActivityGroup
.
-
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.
-
getColor
Description copied from class:AbstractTask
Get the color used when rendering.- Overrides:
getColor
in classAbstractTask
- Returns:
- Color.
-
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.
-
toString
-