}
// If we are dragging over a ListView, highlight the node we are currently on.
// Note: Currently only supports the table view. CraigM: 24/03/2008.
else if (this.getComponent() instanceof ListView) {
ListView lv = (ListView)this.getComponent();
// CraigM:08/07/2008 - If we are not dragging over a list marked for multiple selection.
if (OutlineFieldHasMultipleSelection.get(lv) == false) {
// Check we are allowed to highlight a node. CraigM: 04/04/2008
if (lv.getIsDropHighlightEnabled()) {
// Get the top left position, taking into account scrolling
Point p = lv.getTable().getVisibleRect().getLocation();
// Take into account the header
JTableHeader header = lv.getTable().getTableHeader();
if (header != null) {
p.y -= header.getHeight();
}
// Set the point based on the mouse position
p.y += e.getLocation().y;
// Find the row at that point
int row = lv.getTable().rowAtPoint(p);
// Set the row if valid
if (row >= 0 && row < lv.getTable().getRowCount()) {
lv.getTable().setRowSelectionInterval(row, row);
}
}
}
}
} else {