/** * Returns the item at the given x-y coordinate in the receiver * or null if no such item exists. The x-y coordinate is in the * display relative coordinates. * * @param x the x coordinate used to locate the item * @param y the y coordinate used to locate the item * @return the item at the given x-y coordinate, or null if the coordinate is not in a selectable item */ public Widget getItem(int x, int y) { if (control instanceof Table) { return getItem((Table) control, x, y); } if (control instanceof Tree) { return getItem((Tree) control, x, y); } return null; }
DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragEnter (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragLeave (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragOver (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.drop (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dropAccept (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragOperationChanged (event);
Widget getItem(Tree tree, int x, int y) { Point point = new Point(x, y); point = tree.toControl(point); TreeItem item = tree.getItem(point); if (item == null) { Rectangle area = tree.getClientArea(); if (area.contains(point)) { int treeBottom = area.y + area.height; item = tree.getTopItem(); while (item != null) { Rectangle rect = item.getBounds(); int itemBottom = rect.y + rect.height; if (rect.y <= point.y && point.y < itemBottom) return item; if (itemBottom > treeBottom) break; item = nextItem(tree, item); } return null; } } return item; }
DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragEnter (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragLeave (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragOver (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.drop (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dropAccept (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragOperationChanged (event);
Widget getItem(Tree tree, int x, int y) { Point point = new Point(x, y); point = tree.toControl(point); TreeItem item = tree.getItem(point); if (item == null) { Rectangle area = tree.getClientArea(); if (area.contains(point)) { int treeBottom = area.y + area.height; item = tree.getTopItem(); while (item != null) { Rectangle rect = item.getBounds(); int itemBottom = rect.y + rect.height; if (rect.y <= point.y && point.y < itemBottom) return item; if (itemBottom > treeBottom) break; item = nextItem(tree, item); } return null; } } return item; }
DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragEnter (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragLeave (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragOver (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.drop (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dropAccept (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragOperationChanged (event);
/** * Returns the item at the given x-y coordinate in the receiver * or null if no such item exists. The x-y coordinate is in the * display relative coordinates. * * @param x the x coordinate used to locate the item * @param y the y coordinate used to locate the item * @return the item at the given x-y coordinate, or null if the coordinate is not in a selectable item */ public Widget getItem(int x, int y) { if (control instanceof Table) { return getItem((Table) control, x, y); } if (control instanceof Tree) { return getItem((Tree) control, x, y); } return null; }
Widget getItem(Tree tree, int x, int y) { Point point = new Point(x, y); point = tree.toControl(point); TreeItem item = tree.getItem(point); if (item == null) { Rectangle area = tree.getClientArea(); if (area.contains(point)) { int treeBottom = area.y + area.height; item = tree.getTopItem(); while (item != null) { Rectangle rect = item.getBounds(); int itemBottom = rect.y + rect.height; if (rect.y <= point.y && point.y < itemBottom) return item; if (itemBottom > treeBottom) break; item = nextItem(tree, item); } return null; } } return item; }
DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragEnter (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragLeave (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragOver (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.drop (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dropAccept (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragOperationChanged (event);
/** * Returns the item at the given x-y coordinate in the receiver * or null if no such item exists. The x-y coordinate is in the * display relative coordinates. * * @param x the x coordinate used to locate the item * @param y the y coordinate used to locate the item * @return the item at the given x-y coordinate, or null if the coordinate is not in a selectable item */ public Widget getItem(int x, int y) { if (control instanceof Table) { return getItem((Table) control, x, y); } if (control instanceof Tree) { return getItem((Tree) control, x, y); } return null; }
Widget getItem(Tree tree, int x, int y) { Point point = new Point(x, y); point = tree.toControl(point); TreeItem item = tree.getItem(point); if (item == null) { Rectangle area = tree.getClientArea(); if (area.contains(point)) { int treeBottom = area.y + area.height; item = tree.getTopItem(); while (item != null) { Rectangle rect = item.getBounds(); int itemBottom = rect.y + rect.height; if (rect.y <= point.y && point.y < itemBottom) return item; if (itemBottom > treeBottom) break; item = nextItem(tree, item); } return null; } } return item; }
DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragEnter (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragLeave (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragOver (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.drop (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dropAccept (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragOperationChanged (event);
/** * Returns the item at the given x-y coordinate in the receiver * or null if no such item exists. The x-y coordinate is in the * display relative coordinates. * * @param x the x coordinate used to locate the item * @param y the y coordinate used to locate the item * @return the item at the given x-y coordinate, or null if the coordinate is not in a selectable item */ public Widget getItem(int x, int y) { if (control instanceof Table) { return getItem((Table) control, x, y); } if (control instanceof Tree) { return getItem((Tree) control, x, y); } return null; }
Widget getItem(Tree tree, int x, int y) { Point point = new Point(x, y); point = tree.toControl(point); TreeItem item = tree.getItem(point); if (item == null) { Rectangle area = tree.getClientArea(); if (area.contains(point)) { int treeBottom = area.y + area.height; item = tree.getTopItem(); while (item != null) { Rectangle rect = item.getBounds(); int itemBottom = rect.y + rect.height; if (rect.y <= point.y && point.y < itemBottom) return item; if (itemBottom > treeBottom) break; item = nextItem(tree, item); } return null; } } return item; }
DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragEnter (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragLeave (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragOver (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.drop (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dropAccept (event); DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect(); if (dropEffect != null) { dropEffect.dragOperationChanged (event);
/** * Returns the item at the given x-y coordinate in the receiver * or null if no such item exists. The x-y coordinate is in the * display relative coordinates. * * @param x the x coordinate used to locate the item * @param y the y coordinate used to locate the item * @return the item at the given x-y coordinate, or null if the coordinate is not in a selectable item */ public Widget getItem(int x, int y) { if (control instanceof Table) { return getItem((Table) control, x, y); } if (control instanceof Tree) { return getItem((Tree) control, x, y); } return null; }
Widget getItem(Tree tree, int x, int y) { Point point = new Point(x, y); point = tree.toControl(point); TreeItem item = tree.getItem(point); if (item == null) { Rectangle area = tree.getClientArea(); if (area.contains(point)) { int treeBottom = area.y + area.height; item = tree.getTopItem(); while (item != null) { Rectangle rect = item.getBounds(); int itemBottom = rect.y + rect.height; if (rect.y <= point.y && point.y < itemBottom) return item; if (itemBottom > treeBottom) break; item = nextItem(tree, item); } return null; } } return item; }
/** * Returns the item at the given x-y coordinate in the receiver * or null if no such item exists. The x-y coordinate is in the * display relative coordinates. * * @param x the x coordinate used to locate the item * @param y the y coordinate used to locate the item * @return the item at the given x-y coordinate, or null if the coordinate is not in a selectable item */ public Widget getItem(int x, int y) { if (control instanceof Table) { return getItem((Table) control, x, y); } if (control instanceof Tree) { return getItem((Tree) control, x, y); } return null; }
event.detail = selectedOperation; if (dropEffect != null) { event.item = dropEffect.getItem(dragOverEvent.x, dragOverEvent.y);
event.detail = selectedOperation; if (dropEffect != null) { event.item = dropEffect.getItem(dragOverEvent.x, dragOverEvent.y);