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

下面列出了怎么用sun.awt.dnd.SunDragSourceContextPeer的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: dragonwell8_jdk   文件: 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);
}
 
源代码2 项目: 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;
}
 
源代码3 项目: 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;
}
 
源代码4 项目: TencentKona-8   文件: 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);
}
 
源代码5 项目: jdk8u_jdk   文件: 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);
}
 
/**
 * 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());
}
 
/**
 * 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());
}
 
源代码8 项目: jdk8u60   文件: 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());
}
 
源代码9 项目: jdk8u60   文件: 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());
}
 
源代码10 项目: jdk8u60   文件: 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;
}
 
源代码11 项目: JDKSourceCode1.8   文件: 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);
}
 
源代码12 项目: openjdk-jdk8u   文件: 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);
}
 
/**
 * 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());
}
 
/**
 * 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());
}
 
源代码15 项目: openjdk-jdk8u   文件: 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;
}
 
源代码16 项目: openjdk-jdk8u-backup   文件: 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);
}
 
/**
 * 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());
}
 
/**
 * 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());
}
 
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;
}
 
源代码20 项目: Bytecoder   文件: 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);
}
 
源代码21 项目: openjdk-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());
}
 
源代码22 项目: openjdk-8-source   文件: 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;
}
 
源代码23 项目: openjdk-jdk9   文件: 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());
}
 
源代码24 项目: 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());
}
 
源代码25 项目: openjdk-jdk9   文件: 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());
}
 
/**
 * 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());
}
 
源代码27 项目: 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());
}
 
源代码28 项目: 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());
}
 
源代码29 项目: 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());
}
 
源代码30 项目: hottub   文件: 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());
}
 
 类所在包
 类方法
 同包方法