Package com.storedobject.chart
Class AbstractTask
java.lang.Object
com.storedobject.chart.AbstractTask
- Direct Known Subclasses:
ActivityList.ProjectActivity,Project.ProjectTask
Abstract base class for the representation of tasks/activities used within
Project instances and
ActivityList instances.- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleangetColor()Get the color used when rendering.abstract doubleGet percentage completed.abstract intDuration.abstract LocalDateTimegetEnd()Get the end.intGet the font-size used to render the extra information of a group (Applicable only if this is a group).Get the extra information associated with this.intGet the font-size used to render the detailsfinal longgetId()Unique ID for this task/activity.getName()Get the name.getStart()Get the start.final inthashCode()booleanCheck if this task/activity is completed or not.booleanIs this a milestone task?Start used by renderers (Maybe different from the normal start).voidSet the color to be used when rendering.voidsetExtraFontSize(int extraFontSize) Set the font size used to render the extra information of a group (Applicable only if this is a group).voidsetExtraInfo(String extraInfo) Set extra information.voidsetFontSize(int fontSize) Set the font size used to render the details.voidSet the name.
-
Constructor Details
-
AbstractTask
public AbstractTask()
-
-
Method Details
-
isMilestone
public boolean isMilestone()Is this a milestone task? (Not applicable to activities).- Returns:
- True if the duration is zero.
-
getId
public final long getId()Unique ID for this task/activity.- Returns:
- A unique number that is automatically generated.
-
setName
-
getName
-
getStart
-
getDuration
public abstract int getDuration()Duration. The unit is the same as that of the "duration type" of the project or activity list.- Returns:
- Duration of this task/activity.
-
getEnd
-
getCompleted
public abstract double getCompleted()Get percentage completed.- Returns:
- Percentage completed.
-
renderStart
Start used by renderers (Maybe different from the normal start).- Returns:
- Start for the renderers.
-
getColor
-
setColor
Set the color to be used when rendering.- Parameters:
color- Color.
-
getFontSize
public int getFontSize()Get the font-size used to render the details- Returns:
- Font-size. Default is 12.
-
setFontSize
public void setFontSize(int fontSize) Set the font size used to render the details.- Parameters:
fontSize- Font-size to set (in pixels). Default is 12.
-
getExtraFontSize
public int getExtraFontSize()Get the font-size used to render the extra information of a group (Applicable only if this is a group).- Returns:
- Font-size. Default is 9.
-
setExtraFontSize
public void setExtraFontSize(int extraFontSize) Set the font size used to render the extra information of a group (Applicable only if this is a group).Note: You can also set different values for individual groups. See
setFontSize(int)- Parameters:
extraFontSize- Font-size to set (in pixels). Default is 9.
-
isCompleted
public boolean isCompleted()Check if this task/activity is completed or not.- Returns:
- True/false.
-
setExtraInfo
Set extra information.- Parameters:
extraInfo- Extra information.
-
getExtraInfo
Get the extra information associated with this.- Returns:
- Extra information associated with this.
-
equals
-
hashCode
-