Bug 146750 [DataBinding][CompositeTable] Crash when dragging scroll bar
Run CompositeTableTest Drag scroll bar down Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: -1, Size: 6 at java.util.LinkedList.entry(LinkedList.java:360) at java.util.LinkedList.get(LinkedList.java:303) at org.eclipse.jface.examples.databinding.compositetable.InternalCompositeTable.currentRow(InternalCompositeTable.java:1671) at org.eclipse.jface.examples.databinding.compositetable.InternalCompositeTable.fireRowDepartEvent(InternalCompositeTable.java:1511) at org.eclipse.jface.examples.databinding.compositetable.InternalCompositeTable.setTopRow(InternalCompositeTable.java:732) at org.eclipse.jface.examples.databinding.compositetable.InternalCompositeTable$2.widgetSelected(InternalCompositeTable.java:1239) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1074) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3158) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2838) at org.eclipse.jface.examples.databinding.compositetable.test.CompositeTableTest.main(CompositeTableTest.java:167)
examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/compositetable/InternalCompositeTable.java
}
	/**
	 * Returns the SWT control corresponding to the current row.
	 * 
	 * @return the current row control.
	 */
	public Control getCurrentRowControl() {
		TableRow currentRow = currentRow();
		if (currentRow == null) {
			return null;
		}
		return currentRow().getRowControl();
	}
	
	/**
	 * Method getRowControls. Returns an array of SWT controls where each
	 * control represents a row control in the CompositeTable's current scrolled
	 * position. If CompositeTable is resized, scrolled, such that the rows that
	 * the CompositeTable control is displaying change in any way, the array
	 * that is returned by this method will become out of date and need to be
	 * retrieved again.
	 * 
	 * @return Control[] An array of SWT Control objects, each representing an
	 *         SWT row object.
	 */
	public Control[] getRowControls() {
		Control[] rowControls = new Control[rows.size()];
		for (int i = 0; i < rowControls.length; i++) {
			rowControls[i] = getRowByNumber(i).getRowControl();
		}