Java 类sun.awt.dnd.SunDragSourceContextPeer 实例源码

项目:OpenJSharp    文件:WMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Prohibit multi-button drags.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK ||
          btns == InputEvent.BUTTON3_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:OpenJSharp    文件:XMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Do not allow right mouse button drag since Motif DnD does not
    // terminate drag operation on right mouse button release.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:OpenJSharp    文件:XDragSourceContextPeer.java   
public void handleDragReply(int action, int x, int y, int modifiers) {
    if (action == DnDConstants.ACTION_NONE &&
        targetAction != DnDConstants.ACTION_NONE) {
        dragExit(x, y);
    } else if (action != DnDConstants.ACTION_NONE) {
        int type = 0;

        if (targetAction == DnDConstants.ACTION_NONE) {
            type = SunDragSourceContextPeer.DISPATCH_ENTER;
        } else {
            type = SunDragSourceContextPeer.DISPATCH_MOTION;
        }

        // Note that we use the modifiers state a
        postDragSourceDragEvent(action, modifiers, x, y, type);
    }

    targetAction = action;
}
项目:jdk8u-jdk    文件:WMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Prohibit multi-button drags.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK ||
          btns == InputEvent.BUTTON3_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:jdk8u-jdk    文件:XMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Do not allow right mouse button drag since Motif DnD does not
    // terminate drag operation on right mouse button release.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:jdk8u-jdk    文件:XDragSourceContextPeer.java   
public void handleDragReply(int action, int x, int y, int modifiers) {
    if (action == DnDConstants.ACTION_NONE &&
        targetAction != DnDConstants.ACTION_NONE) {
        dragExit(x, y);
    } else if (action != DnDConstants.ACTION_NONE) {
        int type = 0;

        if (targetAction == DnDConstants.ACTION_NONE) {
            type = SunDragSourceContextPeer.DISPATCH_ENTER;
        } else {
            type = SunDragSourceContextPeer.DISPATCH_MOTION;
        }

        // Note that we use the modifiers state a
        postDragSourceDragEvent(action, modifiers, x, y, type);
    }

    targetAction = action;
}
项目:openjdk-jdk10    文件:EventDispatchThread.java   
boolean filterAndCheckEvent(AWTEvent event) {
    boolean eventOK = true;
    synchronized (eventFilters) {
        for (int i = eventFilters.size() - 1; i >= 0; i--) {
            EventFilter f = eventFilters.get(i);
            EventFilter.FilterAction accept = f.acceptEvent(event);
            if (accept == EventFilter.FilterAction.REJECT) {
                eventOK = false;
                break;
            } else if (accept == EventFilter.FilterAction.ACCEPT_IMMEDIATELY) {
                break;
            }
        }
    }
    return eventOK && SunDragSourceContextPeer.checkEvent(event);
}
项目:openjdk-jdk10    文件:XMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Do not allow right mouse button drag since Motif DnD does not
    // terminate drag operation on right mouse button release.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:openjdk-jdk10    文件:XDragSourceContextPeer.java   
public void handleDragReply(int action, int x, int y, int modifiers) {
    if (action == DnDConstants.ACTION_NONE &&
        targetAction != DnDConstants.ACTION_NONE) {
        dragExit(x, y);
    } else if (action != DnDConstants.ACTION_NONE) {
        int type = 0;

        if (targetAction == DnDConstants.ACTION_NONE) {
            type = SunDragSourceContextPeer.DISPATCH_ENTER;
        } else {
            type = SunDragSourceContextPeer.DISPATCH_MOTION;
        }

        // Note that we use the modifiers state a
        postDragSourceDragEvent(action, modifiers, x, y, type);
    }

    targetAction = action;
}
项目:openjdk-jdk10    文件:WMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Prohibit multi-button drags.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK ||
          btns == InputEvent.BUTTON3_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:openjdk9    文件:XMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Do not allow right mouse button drag since Motif DnD does not
    // terminate drag operation on right mouse button release.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:openjdk9    文件:XDragSourceContextPeer.java   
public void handleDragReply(int action, int x, int y, int modifiers) {
    if (action == DnDConstants.ACTION_NONE &&
        targetAction != DnDConstants.ACTION_NONE) {
        dragExit(x, y);
    } else if (action != DnDConstants.ACTION_NONE) {
        int type = 0;

        if (targetAction == DnDConstants.ACTION_NONE) {
            type = SunDragSourceContextPeer.DISPATCH_ENTER;
        } else {
            type = SunDragSourceContextPeer.DISPATCH_MOTION;
        }

        // Note that we use the modifiers state a
        postDragSourceDragEvent(action, modifiers, x, y, type);
    }

    targetAction = action;
}
项目:openjdk9    文件:WMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Prohibit multi-button drags.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK ||
          btns == InputEvent.BUTTON3_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:jdk8u_jdk    文件:WMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Prohibit multi-button drags.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK ||
          btns == InputEvent.BUTTON3_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:jdk8u_jdk    文件:XMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Do not allow right mouse button drag since Motif DnD does not
    // terminate drag operation on right mouse button release.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:jdk8u_jdk    文件:XDragSourceContextPeer.java   
public void handleDragReply(int action, int x, int y, int modifiers) {
    if (action == DnDConstants.ACTION_NONE &&
        targetAction != DnDConstants.ACTION_NONE) {
        dragExit(x, y);
    } else if (action != DnDConstants.ACTION_NONE) {
        int type = 0;

        if (targetAction == DnDConstants.ACTION_NONE) {
            type = SunDragSourceContextPeer.DISPATCH_ENTER;
        } else {
            type = SunDragSourceContextPeer.DISPATCH_MOTION;
        }

        // Note that we use the modifiers state a
        postDragSourceDragEvent(action, modifiers, x, y, type);
    }

    targetAction = action;
}
项目:lookaside_java-1.8.0-openjdk    文件:WMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Prohibit multi-button drags.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK ||
          btns == InputEvent.BUTTON3_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:lookaside_java-1.8.0-openjdk    文件:XMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Do not allow right mouse button drag since Motif DnD does not
    // terminate drag operation on right mouse button release.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:lookaside_java-1.8.0-openjdk    文件:XDragSourceContextPeer.java   
public void handleDragReply(int action, int x, int y, int modifiers) {
    if (action == DnDConstants.ACTION_NONE &&
        targetAction != DnDConstants.ACTION_NONE) {
        dragExit(x, y);
    } else if (action != DnDConstants.ACTION_NONE) {
        int type = 0;

        if (targetAction == DnDConstants.ACTION_NONE) {
            type = SunDragSourceContextPeer.DISPATCH_ENTER;
        } else {
            type = SunDragSourceContextPeer.DISPATCH_MOTION;
        }

        // Note that we use the modifiers state a
        postDragSourceDragEvent(action, modifiers, x, y, type);
    }

    targetAction = action;
}
项目:infobip-open-jdk-8    文件:WMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Prohibit multi-button drags.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK ||
          btns == InputEvent.BUTTON3_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:infobip-open-jdk-8    文件:XMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Do not allow right mouse button drag since Motif DnD does not
    // terminate drag operation on right mouse button release.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:infobip-open-jdk-8    文件:XDragSourceContextPeer.java   
public void handleDragReply(int action, int x, int y, int modifiers) {
    if (action == DnDConstants.ACTION_NONE &&
        targetAction != DnDConstants.ACTION_NONE) {
        dragExit(x, y);
    } else if (action != DnDConstants.ACTION_NONE) {
        int type = 0;

        if (targetAction == DnDConstants.ACTION_NONE) {
            type = SunDragSourceContextPeer.DISPATCH_ENTER;
        } else {
            type = SunDragSourceContextPeer.DISPATCH_MOTION;
        }

        // Note that we use the modifiers state a
        postDragSourceDragEvent(action, modifiers, x, y, type);
    }

    targetAction = action;
}
项目:jdk8u-dev-jdk    文件:WMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Prohibit multi-button drags.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK ||
          btns == InputEvent.BUTTON3_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:jdk8u-dev-jdk    文件:XMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Do not allow right mouse button drag since Motif DnD does not
    // terminate drag operation on right mouse button release.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:jdk8u-dev-jdk    文件:XDragSourceContextPeer.java   
public void handleDragReply(int action, int x, int y, int modifiers) {
    if (action == DnDConstants.ACTION_NONE &&
        targetAction != DnDConstants.ACTION_NONE) {
        dragExit(x, y);
    } else if (action != DnDConstants.ACTION_NONE) {
        int type = 0;

        if (targetAction == DnDConstants.ACTION_NONE) {
            type = SunDragSourceContextPeer.DISPATCH_ENTER;
        } else {
            type = SunDragSourceContextPeer.DISPATCH_MOTION;
        }

        // Note that we use the modifiers state a
        postDragSourceDragEvent(action, modifiers, x, y, type);
    }

    targetAction = action;
}
项目:jdk7-jdk    文件:WMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Prohibit multi-button drags.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK ||
          btns == InputEvent.BUTTON3_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:jdk7-jdk    文件:XMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Do not allow right mouse button drag since Motif DnD does not
    // terminate drag operation on right mouse button release.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:jdk7-jdk    文件:XDragSourceContextPeer.java   
public void handleDragReply(int action, int x, int y, int modifiers) {
    if (action == DnDConstants.ACTION_NONE &&
        targetAction != DnDConstants.ACTION_NONE) {
        dragExit(x, y);
    } else if (action != DnDConstants.ACTION_NONE) {
        int type = 0;

        if (targetAction == DnDConstants.ACTION_NONE) {
            type = SunDragSourceContextPeer.DISPATCH_ENTER;
        } else {
            type = SunDragSourceContextPeer.DISPATCH_MOTION;
        }

        // Note that we use the modifiers state a
        postDragSourceDragEvent(action, modifiers, x, y, type);
    }

    targetAction = action;
}
项目:openjdk-source-code-learn    文件:WMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Prohibit multi-button drags.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK ||
          btns == InputEvent.BUTTON3_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:openjdk-source-code-learn    文件:XMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Do not allow right mouse button drag since Motif DnD does not
    // terminate drag operation on right mouse button release.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:openjdk-source-code-learn    文件:XDragSourceContextPeer.java   
public void handleDragReply(int action, int x, int y, int modifiers) {
    if (action == DnDConstants.ACTION_NONE &&
        targetAction != DnDConstants.ACTION_NONE) {
        dragExit(x, y);
    } else if (action != DnDConstants.ACTION_NONE) {
        int type = 0;

        if (targetAction == DnDConstants.ACTION_NONE) {
            type = SunDragSourceContextPeer.DISPATCH_ENTER;
        } else {
            type = SunDragSourceContextPeer.DISPATCH_MOTION;
        }

        // Note that we use the modifiers state a
        postDragSourceDragEvent(action, modifiers, x, y, type);
    }

    targetAction = action;
}
项目:OLD-OpenJDK8    文件:WMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Prohibit multi-button drags.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK ||
          btns == InputEvent.BUTTON3_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:OLD-OpenJDK8    文件:XMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Do not allow right mouse button drag since Motif DnD does not
    // terminate drag operation on right mouse button release.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:OLD-OpenJDK8    文件:XDragSourceContextPeer.java   
public void handleDragReply(int action, int x, int y, int modifiers) {
    if (action == DnDConstants.ACTION_NONE &&
        targetAction != DnDConstants.ACTION_NONE) {
        dragExit(x, y);
    } else if (action != DnDConstants.ACTION_NONE) {
        int type = 0;

        if (targetAction == DnDConstants.ACTION_NONE) {
            type = SunDragSourceContextPeer.DISPATCH_ENTER;
        } else {
            type = SunDragSourceContextPeer.DISPATCH_MOTION;
        }

        // Note that we use the modifiers state a
        postDragSourceDragEvent(action, modifiers, x, y, type);
    }

    targetAction = action;
}
项目:openjdk-jdk7u-jdk    文件:WMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Prohibit multi-button drags.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK ||
          btns == InputEvent.BUTTON3_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:openjdk-jdk7u-jdk    文件:XMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Do not allow right mouse button drag since Motif DnD does not
    // terminate drag operation on right mouse button release.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:openjdk-jdk7u-jdk    文件:XDragSourceContextPeer.java   
public void handleDragReply(int action, int x, int y, int modifiers) {
    if (action == DnDConstants.ACTION_NONE &&
        targetAction != DnDConstants.ACTION_NONE) {
        dragExit(x, y);
    } else if (action != DnDConstants.ACTION_NONE) {
        int type = 0;

        if (targetAction == DnDConstants.ACTION_NONE) {
            type = SunDragSourceContextPeer.DISPATCH_ENTER;
        } else {
            type = SunDragSourceContextPeer.DISPATCH_MOTION;
        }

        // Note that we use the modifiers state a
        postDragSourceDragEvent(action, modifiers, x, y, type);
    }

    targetAction = action;
}
项目:openjdk-icedtea7    文件:WMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Prohibit multi-button drags.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK ||
          btns == InputEvent.BUTTON3_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:openjdk-icedtea7    文件:XMouseDragGestureRecognizer.java   
/**
 * determine the drop action from the event
 */

protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    int btns = mods & ButtonMask;

    // Do not allow right mouse button drag since Motif DnD does not
    // terminate drag operation on right mouse button release.
    if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
          btns == InputEvent.BUTTON2_DOWN_MASK)) {
        return DnDConstants.ACTION_NONE;
    }

    return
        SunDragSourceContextPeer.convertModifiersToDropAction(mods,
                                                              getSourceActions());
}
项目:openjdk-icedtea7    文件:XDragSourceContextPeer.java   
public void handleDragReply(int action, int x, int y, int modifiers) {
    if (action == DnDConstants.ACTION_NONE &&
        targetAction != DnDConstants.ACTION_NONE) {
        dragExit(x, y);
    } else if (action != DnDConstants.ACTION_NONE) {
        int type = 0;

        if (targetAction == DnDConstants.ACTION_NONE) {
            type = SunDragSourceContextPeer.DISPATCH_ENTER;
        } else {
            type = SunDragSourceContextPeer.DISPATCH_MOTION;
        }

        // Note that we use the modifiers state a
        postDragSourceDragEvent(action, modifiers, x, y, type);
    }

    targetAction = action;
}