diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TableDragAndDropEffect.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TableDragAndDropEffect.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TableDragAndDropEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TableDragAndDropEffect.java new file mode 100644 index 0000000000..e16bcacb21 --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TableDragAndDropEffect.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2000, 2003 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.swt.dnd; + + +import org.eclipse.swt.graphics.*; +import org.eclipse.swt.widgets.*; + +class TableDragAndDropEffect extends DragAndDropEffect { + private Table table; + +TableDragAndDropEffect(Table table) { + this.table = table; +} +Widget getItem(int x, int y) { + if (table == null) return null; + Point coordinates = new Point(x, y); + coordinates = table.toControl(coordinates); + return table.getItem(coordinates); +} +} |