.append("The <b>red items</b> represent gaps in the timeline and the <b>green items</b> represent points in the timeline where more than one record show activity.<br/><br/>");
chartDescription
.append("You can <b>zoom in</b> by clicking and dragging the area that you want to examine in further detail.");
if (groupNames.size() > GROUPS_VISIBLE) {
final JScrollBar scroll = new JScrollBar(JScrollBar.VERTICAL);
scroll.setMinimum(0);
scroll.setMaximum(groupNames.size());
scroll.addAdjustmentListener(new AdjustmentListener() {
@Override
public void adjustmentValueChanged(AdjustmentEvent e) {
int value = e.getAdjustable().getValue();
slidingDataset.setFirstCategoryIndex(value);
}
});
chartPanel.addMouseWheelListener(new MouseWheelListener() {
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
int scrollType = e.getScrollType();
if (scrollType == MouseWheelEvent.WHEEL_UNIT_SCROLL) {
int wheelRotation = e.getWheelRotation();
scroll.setValue(scroll.getValue() + wheelRotation);
}
}
});
final DCPanel outerPanel = new DCPanel();