GanttBarStyle

Inheritance: java.lang.Object

public class GanttBarStyle

Represents a bar style used by MSP in Gantt Chart view.

Constructors

ConstructorDescription
GanttBarStyle()Initializes a new instance of the GanttBarStyle class.

Methods

MethodDescription
getBottomBarTextConverter()Gets user-defined converter to get text to render on the bottom of the task’s bar.
getBottomField()Gets data to be displayed on the bottom of the bar.
getEndShape()Gets an end shape of the bar.
getEndShapeColor()Gets a color of the end shape.
getEndShapeType()Gets a type of the end shape.
getFrom()Gets a start point position of the gantt bar.
getInsideBarTextConverter()Gets user-defined converter to get text to render inside of the task’s bar.
getInsideField()Gets data to be displayed inside of the bar.
getLeftBarTextConverter()Gets user-defined converter to get text to render on the left of the task’s bar.
getLeftField()Gets data to be displayed on the left of the bar.
getMiddleFillPattern()Gets a fill pattern of the gantt bar.
getMiddleShape()Gets a middle shape of the bar.
getMiddleShapeColor()Gets a color of the middle shape.
getName()Gets a name of the style.
getParentStyle()Gets parent (or common) style for custom task-specific style.
getRightBarTextConverter()Gets user-defined converter to get text to render on the right of the task’s bar.
getRightField()Gets data to be displayed on the right of the bar.
getRow()Gets a row number.
getShowForCategories()Gets task categories for which the style is applied.
getShowForTaskUid()Gets Unique Id of a task for which the style is applied.
getStartShape()Gets a start shape of the bar.
getStartShapeColor()Gets a color of the start shape.
getStartShapeType()Gets a type of the start shape.
getTo()Gets a finish point position of the gantt bar.
getTopBarTextConverter()Gets user-defined converter to get text to render on the top of the task’s bar.
getTopField()Gets data to be displayed on the top of the bar.
setBottomBarTextConverter(TaskBarTextConverter value)Sets user-defined converter to get text to render on the bottom of the task’s bar.
setBottomField(int value)Sets data to be displayed on the bottom of the bar.
setEndShape(int value)Sets an end shape of the bar.
setEndShapeColor(Color value)Sets a color of the end shape.
setEndShapeType(int value)Sets a type of the end shape.
setFrom(int value)Sets a start point position of the gantt bar.
setInsideBarTextConverter(TaskBarTextConverter value)Sets user-defined converter to get text to render inside of the task’s bar.
setInsideField(int value)Sets data to be displayed inside of the bar.
setLeftBarTextConverter(TaskBarTextConverter value)Sets user-defined converter to get text to render on the left of the task’s bar.
setLeftField(int value)Sets data to be displayed on the left of the bar.
setMiddleFillPattern(int value)Sets a fill pattern of the gantt bar.
setMiddleShape(int value)Sets a middle shape of the bar.
setMiddleShapeColor(Color value)Sets a color of the middle shape.
setName(String value)Sets a name of the style.
setParentStyle(GanttBarStyle value)Sets parent (or common) style for custom task-specific style.
setRightBarTextConverter(TaskBarTextConverter value)Sets user-defined converter to get text to render on the right of the task’s bar.
setRightField(int value)Sets data to be displayed on the right of the bar.
setRow(int value)Sets a row number.
setShowForCategories(List<Integer> value)Sets task categories for which the style is applied.
setShowForTaskUid(Integer value)Sets Unique Id of a task for which the style is applied.
setStartShape(int value)Sets a start shape of the bar.
setStartShapeColor(Color value)Sets a color of the start shape.
setStartShapeType(int value)Sets a type of the start shape.
setTo(int value)Sets a finish point position of the gantt bar.
setTopBarTextConverter(TaskBarTextConverter value)Sets user-defined converter to get text to render on the top of the task’s bar.
setTopField(int value)Sets data to be displayed on the top of the bar.

GanttBarStyle()

public GanttBarStyle()

Initializes a new instance of the GanttBarStyle class.

getBottomBarTextConverter()

public final TaskBarTextConverter getBottomBarTextConverter()

Gets user-defined converter to get text to render on the bottom of the task’s bar. Overrides the value of BottomField (getBottomField()/setBottomField(int)) property.


Is not persisted to MPP format.

Returns: TaskBarTextConverter - user-defined converter to get text to render on the bottom of the task’s bar.

getBottomField()

public final int getBottomField()

Gets data to be displayed on the bottom of the bar. Field.

Returns: int - data to be displayed on the bottom of the bar.

getEndShape()

public final int getEndShape()

Gets an end shape of the bar.

Returns: int - an end shape of the bar.

getEndShapeColor()

public final Color getEndShapeColor()

Gets a color of the end shape.

Returns: java.awt.Color - a color of the end shape.

getEndShapeType()

public final int getEndShapeType()

Gets a type of the end shape. GanttBarType.

Returns: int - a type of the end shape.

getFrom()

public final int getFrom()

Gets a start point position of the gantt bar. Field.

Returns: int - a start point position of the gantt bar.

getInsideBarTextConverter()

public final TaskBarTextConverter getInsideBarTextConverter()

Gets user-defined converter to get text to render inside of the task’s bar. Overrides the value of InsideField (getInsideField()/setInsideField(int)) property.


Is not persisted to MPP format.

Returns: TaskBarTextConverter - user-defined converter to get text to render inside of the task’s bar.

getInsideField()

public final int getInsideField()

Gets data to be displayed inside of the bar. Field.

Returns: int - data to be displayed inside of the bar.

getLeftBarTextConverter()

public final TaskBarTextConverter getLeftBarTextConverter()

Gets user-defined converter to get text to render on the left of the task’s bar. Overrides the value of LeftField (getLeftField()/setLeftField(int)) property.


Is not persisted to MPP format.

Returns: TaskBarTextConverter - user-defined converter to get text to render on the left of the task’s bar.

getLeftField()

public final int getLeftField()

Gets data to be displayed on the left of the bar. Field.

Returns: int - data to be displayed on the left of the bar.

getMiddleFillPattern()

public final int getMiddleFillPattern()

Gets a fill pattern of the gantt bar.

Returns: int - a fill pattern of the gantt bar.

getMiddleShape()

public final int getMiddleShape()

Gets a middle shape of the bar.

Returns: int - a middle shape of the bar.

getMiddleShapeColor()

public final Color getMiddleShapeColor()

Gets a color of the middle shape.

Returns: java.awt.Color - a color of the middle shape.

getName()

public final String getName()

Gets a name of the style.

Returns: java.lang.String - a name of the style.

getParentStyle()

public final GanttBarStyle getParentStyle()

Gets parent (or common) style for custom task-specific style.


Task can have multiple custom styles with different parent styles. For example consider task having custom style with “Critical” parent style and another style with “Normal” parent style. Simply put, if task is critical, the first style is applied. If task becomes non-critical, the second style is applied (this logic is inherited from Microsoft Project Professional).

Returns: GanttBarStyle - parent (or common) style for custom task-specific style.

getRightBarTextConverter()

public final TaskBarTextConverter getRightBarTextConverter()

Gets user-defined converter to get text to render on the right of the task’s bar. Overrides the value of RightField (getRightField()/setRightField(int)) property.


Is not persisted to MPP format.

Returns: TaskBarTextConverter - user-defined converter to get text to render on the right of the task’s bar.

getRightField()

public final int getRightField()

Gets data to be displayed on the right of the bar. Field.

Returns: int - data to be displayed on the right of the bar.

getRow()

public final int getRow()

Gets a row number.


Can be from 1 to 4 (1 is default value).

Returns: int - a row number.

getShowForCategories()

public final List<Integer> getShowForCategories()

Gets task categories for which the style is applied. Is applicable for parent (or common) styles of bars in Gantt chart (see GanttChartView.BarStyles (GanttChartView.getBarStyles())).

Returns: java.util.List<java.lang.Integer> - task categories for which the style is applied.

getShowForTaskUid()

public final Integer getShowForTaskUid()

Gets Unique Id of a task for which the style is applied. Is applicable for task-specific styles of bars in Gantt chart (see GanttChartView.CustomBarStyles (GanttChartView.getCustomBarStyles())).

Returns: java.lang.Integer - Unique Id of a task for which the style is applied.

getStartShape()

public final int getStartShape()

Gets a start shape of the bar.

Returns: int - a start shape of the bar.

getStartShapeColor()

public final Color getStartShapeColor()

Gets a color of the start shape.

Returns: java.awt.Color - a color of the start shape.

getStartShapeType()

public final int getStartShapeType()

Gets a type of the start shape.

Returns: int - a type of the start shape.

getTo()

public final int getTo()

Gets a finish point position of the gantt bar.

Returns: int - a finish point position of the gantt bar.

getTopBarTextConverter()

public final TaskBarTextConverter getTopBarTextConverter()

Gets user-defined converter to get text to render on the top of the task’s bar. Overrides the value of TopField (getTopField()/setTopField(int)) property.


Is not persisted to MPP format.

Returns: TaskBarTextConverter - user-defined converter to get text to render on the top of the task’s bar.

getTopField()

public final int getTopField()

Gets data to be displayed on the top of the bar.

Returns: int - data to be displayed on the top of the bar.

setBottomBarTextConverter(TaskBarTextConverter value)

public final void setBottomBarTextConverter(TaskBarTextConverter value)

Sets user-defined converter to get text to render on the bottom of the task’s bar. Overrides the value of BottomField (getBottomField()/setBottomField(int)) property.


Is not persisted to MPP format.

Parameters:

ParameterTypeDescription
valueTaskBarTextConverteruser-defined converter to get text to render on the bottom of the task’s bar.

setBottomField(int value)

public final void setBottomField(int value)

Sets data to be displayed on the bottom of the bar. Field.

Parameters:

ParameterTypeDescription
valueintdata to be displayed on the bottom of the bar.

setEndShape(int value)

public final void setEndShape(int value)

Sets an end shape of the bar.

Parameters:

ParameterTypeDescription
valueintan end shape of the bar.

setEndShapeColor(Color value)

public final void setEndShapeColor(Color value)

Sets a color of the end shape.

Parameters:

ParameterTypeDescription
valuejava.awt.Colora color of the end shape.

setEndShapeType(int value)

public final void setEndShapeType(int value)

Sets a type of the end shape. GanttBarType.

Parameters:

ParameterTypeDescription
valueinta type of the end shape.

setFrom(int value)

public final void setFrom(int value)

Sets a start point position of the gantt bar. Field.

Parameters:

ParameterTypeDescription
valueinta start point position of the gantt bar.

setInsideBarTextConverter(TaskBarTextConverter value)

public final void setInsideBarTextConverter(TaskBarTextConverter value)

Sets user-defined converter to get text to render inside of the task’s bar. Overrides the value of InsideField (getInsideField()/setInsideField(int)) property.


Is not persisted to MPP format.

Parameters:

ParameterTypeDescription
valueTaskBarTextConverteruser-defined converter to get text to render inside of the task’s bar.

setInsideField(int value)

public final void setInsideField(int value)

Sets data to be displayed inside of the bar. Field.

Parameters:

ParameterTypeDescription
valueintdata to be displayed inside of the bar.

setLeftBarTextConverter(TaskBarTextConverter value)

public final void setLeftBarTextConverter(TaskBarTextConverter value)

Sets user-defined converter to get text to render on the left of the task’s bar. Overrides the value of LeftField (getLeftField()/setLeftField(int)) property.


Is not persisted to MPP format.

Parameters:

ParameterTypeDescription
valueTaskBarTextConverteruser-defined converter to get text to render on the left of the task’s bar.

setLeftField(int value)

public final void setLeftField(int value)

Sets data to be displayed on the left of the bar. Field.

Parameters:

ParameterTypeDescription
valueintdata to be displayed on the left of the bar.

setMiddleFillPattern(int value)

public final void setMiddleFillPattern(int value)

Sets a fill pattern of the gantt bar.

Parameters:

ParameterTypeDescription
valueinta fill pattern of the gantt bar.

setMiddleShape(int value)

public final void setMiddleShape(int value)

Sets a middle shape of the bar.

Parameters:

ParameterTypeDescription
valueinta middle shape of the bar.

setMiddleShapeColor(Color value)

public final void setMiddleShapeColor(Color value)

Sets a color of the middle shape.

Parameters:

ParameterTypeDescription
valuejava.awt.Colora color of the middle shape.

setName(String value)

public final void setName(String value)

Sets a name of the style.

Parameters:

ParameterTypeDescription
valuejava.lang.Stringa name of the style.

setParentStyle(GanttBarStyle value)

public final void setParentStyle(GanttBarStyle value)

Sets parent (or common) style for custom task-specific style.


Task can have multiple custom styles with different parent styles. For example consider task having custom style with “Critical” parent style and another style with “Normal” parent style. Simply put, if task is critical, the first style is applied. If task becomes non-critical, the second style is applied (this logic is inherited from Microsoft Project Professional).

Parameters:

ParameterTypeDescription
valueGanttBarStyleparent (or common) style for custom task-specific style.

setRightBarTextConverter(TaskBarTextConverter value)

public final void setRightBarTextConverter(TaskBarTextConverter value)

Sets user-defined converter to get text to render on the right of the task’s bar. Overrides the value of RightField (getRightField()/setRightField(int)) property.


Is not persisted to MPP format.

Parameters:

ParameterTypeDescription
valueTaskBarTextConverteruser-defined converter to get text to render on the right of the task’s bar.

setRightField(int value)

public final void setRightField(int value)

Sets data to be displayed on the right of the bar. Field.

Parameters:

ParameterTypeDescription
valueintdata to be displayed on the right of the bar.

setRow(int value)

public final void setRow(int value)

Sets a row number.


Can be from 1 to 4 (1 is default value).

Parameters:

ParameterTypeDescription
valueinta row number.

setShowForCategories(List<Integer> value)

public final void setShowForCategories(List<Integer> value)

Sets task categories for which the style is applied. Is applicable for parent (or common) styles of bars in Gantt chart (see GanttChartView.BarStyles (GanttChartView.getBarStyles())).

Parameters:

ParameterTypeDescription
valuejava.util.List<java.lang.Integer>task categories for which the style is applied.

setShowForTaskUid(Integer value)

public final void setShowForTaskUid(Integer value)

Sets Unique Id of a task for which the style is applied. Is applicable for task-specific styles of bars in Gantt chart (see GanttChartView.CustomBarStyles (GanttChartView.getCustomBarStyles())).

Parameters:

ParameterTypeDescription
valuejava.lang.IntegerUnique Id of a task for which the style is applied.

setStartShape(int value)

public final void setStartShape(int value)

Sets a start shape of the bar.

Parameters:

ParameterTypeDescription
valueinta start shape of the bar.

setStartShapeColor(Color value)

public final void setStartShapeColor(Color value)

Sets a color of the start shape.

Parameters:

ParameterTypeDescription
valuejava.awt.Colora color of the start shape.

setStartShapeType(int value)

public final void setStartShapeType(int value)

Sets a type of the start shape.

Parameters:

ParameterTypeDescription
valueinta type of the start shape.

setTo(int value)

public final void setTo(int value)

Sets a finish point position of the gantt bar.

Parameters:

ParameterTypeDescription
valueinta finish point position of the gantt bar.

setTopBarTextConverter(TaskBarTextConverter value)

public final void setTopBarTextConverter(TaskBarTextConverter value)

Sets user-defined converter to get text to render on the top of the task’s bar. Overrides the value of TopField (getTopField()/setTopField(int)) property.


Is not persisted to MPP format.

Parameters:

ParameterTypeDescription
valueTaskBarTextConverteruser-defined converter to get text to render on the top of the task’s bar.

setTopField(int value)

public final void setTopField(int value)

Sets data to be displayed on the top of the bar.

Parameters:

ParameterTypeDescription
valueintdata to be displayed on the top of the bar.