本文整理匯總了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;
}