本文整理汇总了Java中org.eclipse.swt.dnd.DND.DROP_TARGET_MOVE属性的典型用法代码示例。如果您正苦于以下问题:Java DND.DROP_TARGET_MOVE属性的具体用法?Java DND.DROP_TARGET_MOVE怎么用?Java DND.DROP_TARGET_MOVE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.dnd.DND
的用法示例。
在下文中一共展示了DND.DROP_TARGET_MOVE属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTransferModes
Set<TransferMode> getTransferModes(int bits) {
Set<TransferMode> set = new HashSet<>();
if ((bits & DND.DROP_COPY) != 0) {
set.add(TransferMode.COPY);
}
if ((bits & DND.DROP_MOVE) != 0) {
set.add(TransferMode.MOVE);
}
if ((bits & DND.DROP_TARGET_MOVE) != 0) {
set.add(TransferMode.MOVE);
}
if ((bits & DND.DROP_LINK) != 0) {
set.add(TransferMode.LINK);
}
return set;
}
示例2: getTransferMode
TransferMode getTransferMode(int bits) {
switch (bits) {
case DND.DROP_COPY:
return TransferMode.COPY;
case DND.DROP_MOVE:
case DND.DROP_TARGET_MOVE:
return TransferMode.MOVE;
case DND.DROP_LINK:
return TransferMode.LINK;
default:
return null;
}
}
示例3: getDetailString
/**
* Utility function to get a string to print out a "detail"
* @param detail
* @return the string name of the detail.
*/
protected final String getDetailString(int detail) {
switch (detail) {
case DND.DROP_DEFAULT: return "DND.DROP_DEFAULT";
case DND.DROP_COPY: return "DND.DROP_COPY";
case DND.DROP_LINK: return "DND.DROP_LINK";
case DND.DROP_MOVE: return "DND.DROP_MOVE";
case DND.DROP_NONE: return "DND.DROP_NONE";
case DND.DROP_TARGET_MOVE: return "DND.DROP_TARGET_MOVE";
default: return "DND.???";
}
}
示例4: getDetailString
protected final String getDetailString(int detail) {
switch (detail) {
case DND.DROP_DEFAULT: return "DND.DROP_DEFAULT";
case DND.DROP_COPY: return "DND.DROP_COPY";
case DND.DROP_LINK: return "DND.DROP_LINK";
case DND.DROP_MOVE: return "DND.DROP_MOVE";
case DND.DROP_NONE: return "DND.DROP_NONE";
case DND.DROP_TARGET_MOVE: return "DND.DROP_TARGET_MOVE";
default: return "DND.???";
}
}
示例5: dragFinished
@Override
public void dragFinished(DragSourceEvent event) {
if (!event.doit)
return;
if (event.detail == DND.DROP_MOVE) {
// http://bugs.eclipse.org/bugs/show_bug.cgi?id=30543
// handleDropMove(event);
} else if (event.detail == DND.DROP_TARGET_MOVE) {
handleRefresh();
}
}
示例6: getTransferModes
Set<TransferMode> getTransferModes(int bits) {
Set<TransferMode> set = new HashSet<TransferMode>();
if ((bits & DND.DROP_COPY) != 0) set.add(TransferMode.COPY);
if ((bits & DND.DROP_MOVE) != 0) set.add(TransferMode.MOVE);
if ((bits & DND.DROP_TARGET_MOVE) != 0) set.add(TransferMode.MOVE);
if ((bits & DND.DROP_LINK) != 0) set.add(TransferMode.LINK);
return set;
}