| | | | Browse by category |
Question
How to make the background of GanttSheet transparent?
Answer
There are several components that need to be configured to achieve this:
// Transparent background color:
Color bg = new Color( 0,0,0,0 );
// On the IlvChart:
ganttChart.setBackground( bg );
ganttChart.setOpaque( false );
// On the IlvManagerView:
ganttChart.getGanttSheet().setDoubleBuffering(false);
ganttChart.getGanttSheet().setBackground(bg);
// On the IlvJManagerViewPanel:
((JComponent)ganttChart.getGanttSheet().getParent()).setOpaque(false);
// On the IlvHierarchyChart$Splitter
((JComponent)ganttChart.getGanttSheet().getParent().getParent().getParent()).setOpaque(false);
// Remove the default weekend grid:
ganttFront.getGanttSheet().setVerticalGrid(new IlvVerticalGanttGrid());
// On the horizontal and vertical grid:
ganttFront.getGanttSheet().getHorizontalGrid().setForeground(bg);
ganttFront.getGanttSheet().getVerticalGrid().setForeground(bg);