Accessing the scrollbars of IlvHierarchyChart

Article ID: 2241
Last updated: 28 May, 2018
Article ID: 2241
Last updated: 28 May, 2018
Revision: 3
Views: 783
Posted: 17 Dec, 2003
by Dean J.
Updated: 28 May, 2018
by Gargani A.

Question

How to access the scrollbars of IlvHierarchyChart?

Answer

The horizontal scrollbar of the Gantt Sheet can be accessed using the
IlvHierarchyChart.getTimeScrollBar().

In order to gain access to the vertical scrollbar of IlvHierarchyChart, it is necessary

to get IlvJScrollGanttSheet, which is an indirect parent of

IlvGanttSheet. Use code like this:

IlvJScrollGanttSheet jSGanttSheet = (IlvJScrollGanttSheet)
SwingUtilities.getAncestorOfClass(IlvJScrollGanttSheet.class, chart.getGanttSheet());

JScrollBar verticalScrollbar = jSGanttSheet.getVerticalScrollBar();

where chart is an instance of IlvHierarchyChart.

The horizontal scrollbar of the Gantt Table can be access using the following:

JScrollPane scrollPane = (JScrollPane)

SwingUtilities.getAncestorOfClass(JScrollPane.class, chart.getTable());

JScrollBar tableSb = scrollPane.getHorizontalScrollBar();

However, IlvHierarchyChart provides upper level methods to

control the visibility of the contents of the chart, such as

IlvHierarchyChart.makeRowVisible(IlvHierarchyNode row)

or
IlvHierarchyChart.setVisibleInterval(Date time, IlvDuration duration).

Note: The above codes only address the Swing Gantt Chart component, not JSF Gantt Chart component

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2241
Last updated: 28 May, 2018
Revision: 3
Views: 783
Posted: 17 Dec, 2003 by Dean J.
Updated: 28 May, 2018 by Gargani A.
Also listed in


Others in this category