| | | | Browse by category |
Question
How to change the appearance of the constraints in a Gantt chart?
Answer
The easiest and preferred way of controlling the appearance of a constraint is to use its CSS styling capabilities.
The section "Styling Constraints" in the user's manual details all the properties that can be set through CSS.
If the customization you intend to achieve goes beyond what is possible with CSS (for example, controlling the shape of the constraint), you will have to create a subclass of IlvConstraintGraphic
and install it through your own constraint graphic factory.
By default, JViews uses an instance of IlvDefaultConstraintGraphicFactory
, which creates instances of IlvConstraintGraphic
.
You can create your own subclass of IlvConstraintGraphic
and subclass IlvDefaultConstraintGraphicFactory
, so that it returns (through the createConstraintGraphic
method) an instance of the new constraint graphic subclass.
You can then install your new factory class, thanks to IlvGanttSheet.setConstraintGraphicFactory
or IlvHierarchyChart.setConstraintGraphicFactory
.