本文整理了Java中org.eclipse.jface.viewers.ViewerDropAdapter.determineLocation()
方法的一些代码示例,展示了ViewerDropAdapter.determineLocation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ViewerDropAdapter.determineLocation()
方法的具体详情如下:
包路径:org.eclipse.jface.viewers.ViewerDropAdapter
类名称:ViewerDropAdapter
方法名:determineLocation
[英]Returns the position of the given event's coordinates relative to its target. The position is determined to be before, after, or on the item, based on some threshold value.
[中]返回给定事件坐标相对于其目标的位置。根据某个阈值确定位置在项目之前、之后或之上。
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
public void drop(DropTargetEvent event) {
currentLocation = determineLocation(event);
currentEvent = event;
if (overrideOperation != -1)
currentOperation = overrideOperation;
//perform the drop behavior
if (!performDrop(event.data)) {
event.detail = DND.DROP_NONE;
}
//reset for next time
currentOperation = DND.DROP_NONE;
currentEvent = null;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
@Override
public void drop(DropTargetEvent event) {
currentLocation = determineLocation(event);
currentEvent = event;
if (overrideOperation != -1)
currentOperation = overrideOperation;
//perform the drop behavior
if (!performDrop(event.data)) {
event.detail = DND.DROP_NONE;
}
//reset for next time
currentOperation = DND.DROP_NONE;
currentEvent = null;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
@Override
public void drop(DropTargetEvent event) {
currentLocation = determineLocation(event);
currentEvent = event;
if (overrideOperation != -1)
currentOperation = overrideOperation;
//perform the drop behavior
if (!performDrop(event.data)) {
event.detail = DND.DROP_NONE;
}
//reset for next time
currentOperation = DND.DROP_NONE;
currentEvent = null;
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
public void dragOver(DropTargetEvent event) {
//use newly revealed item as target if scrolling occurs
Object target = determineTarget(event);
//set the location feedback
int oldLocation = currentLocation;
currentLocation = determineLocation(event);
setFeedback(event, currentLocation);
//see if anything has really changed before doing validation.
if (target != currentTarget || currentLocation != oldLocation) {
currentTarget = target;
doDropValidation(event);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
@Override
public void dragOver(DropTargetEvent event) {
//use newly revealed item as target if scrolling occurs
Object target = determineTarget(event);
//set the location feedback
int oldLocation = currentLocation;
currentLocation = determineLocation(event);
setFeedback(event, currentLocation);
//see if anything has really changed before doing validation.
if (target != currentTarget || currentLocation != oldLocation) {
currentTarget = target;
doDropValidation(event);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
@Override
public void dragOver(DropTargetEvent event) {
//use newly revealed item as target if scrolling occurs
Object target = determineTarget(event);
//set the location feedback
int oldLocation = currentLocation;
currentLocation = determineLocation(event);
setFeedback(event, currentLocation);
//see if anything has really changed before doing validation.
if (target != currentTarget || currentLocation != oldLocation) {
currentTarget = target;
doDropValidation(event);
}
}
内容来源于网络,如有侵权,请联系作者删除!