org.eclipse.jface.viewers.ViewerDropAdapter.setFeedback()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(53)

本文整理了Java中org.eclipse.jface.viewers.ViewerDropAdapter.setFeedback()方法的一些代码示例,展示了ViewerDropAdapter.setFeedback()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ViewerDropAdapter.setFeedback()方法的具体详情如下:
包路径:org.eclipse.jface.viewers.ViewerDropAdapter
类名称:ViewerDropAdapter
方法名:setFeedback

ViewerDropAdapter.setFeedback介绍

[英]Sets whether visible insertion feedback should be presented to the user.

Typical insertion feedback is the horizontal insertion bars that appear between adjacent items while dragging.
[中]设置是否应向用户显示可见的插入反馈。
典型的插入反馈是在拖动时出现在相邻项之间的水平插入条。

代码示例

代码示例来源: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);
  }
}

相关文章