本文整理汇总了Java中java.awt.dnd.DragSource.getDragThreshold方法的典型用法代码示例。如果您正苦于以下问题:Java DragSource.getDragThreshold方法的具体用法?Java DragSource.getDragThreshold怎么用?Java DragSource.getDragThreshold使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.dnd.DragSource
的用法示例。
在下文中一共展示了DragSource.getDragThreshold方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: mousePressedImpl
import java.awt.dnd.DragSource; //导入方法依赖的package包/类
/**
* Returns whether or not the event is potentially part of a drag sequence.
*/
private boolean mousePressedImpl(MouseEvent me) {
component = (JComponent)me.getSource();
if (mapDragOperationFromModifiers(me, component.getTransferHandler())
!= TransferHandler.NONE) {
motionThreshold = DragSource.getDragThreshold();
dndArmedEvent = me;
return true;
}
clearState();
return false;
}
示例2: mousePressed
import java.awt.dnd.DragSource; //导入方法依赖的package包/类
/**
* Invoked when a mouse button has been pressed on a component.
*/
@Override
public void mousePressed(MouseEvent e) {
events.clear();
if (mapDragOperationFromModifiers(e) != DnDConstants.ACTION_NONE) {
try {
motionThreshold = DragSource.getDragThreshold();
} catch (Exception exc) {
motionThreshold = 5;
}
appendEvent(e);
}
}
示例3: mousePressed
import java.awt.dnd.DragSource; //导入方法依赖的package包/类
/**
* Invoked when a mouse button has been pressed on a component.
*/
public void mousePressed(MouseEvent e) {
events.clear();
if (mapDragOperationFromModifiers(e) != DnDConstants.ACTION_NONE) {
try {
motionThreshold = DragSource.getDragThreshold();
} catch (Exception exc) {
motionThreshold = 5;
}
appendEvent(e);
}
}