Package java.awt.dnd

Examples of java.awt.dnd.DragSourceDragEvent


    }
   
    /** Get the currently requested drop action. */
    protected int getDropAction(DragSourceEvent ev) {
        if (ev instanceof DragSourceDragEvent) {
            DragSourceDragEvent e = (DragSourceDragEvent)ev;
            return e.getDropAction();
        }
        if (ev instanceof DragSourceDropEvent) {
            return ((DragSourceDropEvent)ev).getDropAction();
        }
        return NONE;
View Full Code Here


     * one and there are no modifiers.
     */
    protected int adjustDropAction(DragSourceEvent ev) {
        int action = getDropAction(ev);
        if (ev instanceof DragSourceDragEvent) {
            DragSourceDragEvent e = (DragSourceDragEvent)ev;
            if (action == NONE) {
                int mods = e.getGestureModifiersEx() & KEY_MASK;
                if (mods == 0) {
                    action = getAcceptableDropAction(e.getTargetActions());
                }
            }
        }
        return action;
    }
View Full Code Here

    private void describe(String type, DragSourceEvent e) {
        if (false) {
            DragSourceContext ds = e.getDragSourceContext();
            String msg = "drag: " + type;
            if (e instanceof DragSourceDragEvent) {
                DragSourceDragEvent ev = (DragSourceDragEvent)e;
                msg += ": src=" + actionString(ds.getSourceActions())
                    + " usr=" + actionString(ev.getUserAction())
                    + " tgt=" + actionString(ev.getTargetActions())
                    + " act=" + actionString(ev.getDropAction())
                    + " mods=" + ev.getGestureModifiersEx();
            }
            else {
                msg += ": e=" + e;
            }
            if (!msg.equals(lastAction)) {
View Full Code Here

        final int dropAction =
            SunDragSourceContextPeer.convertModifiersToDropAction(modifiers,
                                                                  sourceActions);

        DragSourceDragEvent event =
            new DragSourceDragEvent(getDragSourceContext(),
                                    dropAction,
                                    targetAction & sourceActions,
                                    modifiers, x, y);
        EventDispatcher dispatcher = new EventDispatcher(dispatchType, event);
View Full Code Here

            break;
        }
    }
   
    private DragSourceDragEvent newDragSourceDragEvent() {
        return new DragSourceDragEvent(
                context, userAction, targetActions, modifiers, x, y);
    }
View Full Code Here

            break;
        }
    }
   
    private DragSourceDragEvent newDragSourceDragEvent() {
        return new DragSourceDragEvent(
                context, userAction, targetActions, modifiers, x, y);
    }
View Full Code Here

    }
   
    /** Get the currently requested drop action. */
    protected int getDropAction(DragSourceEvent ev) {
        if (ev instanceof DragSourceDragEvent) {
            DragSourceDragEvent e = (DragSourceDragEvent)ev;
            return e.getDropAction();
        }
        if (ev instanceof DragSourceDropEvent) {
            return ((DragSourceDropEvent)ev).getDropAction();
        }
        return NONE;
View Full Code Here

     * one and there are no modifiers.
     */
    protected int adjustDropAction(DragSourceEvent ev) {
        int action = getDropAction(ev);
        if (ev instanceof DragSourceDragEvent) {
            DragSourceDragEvent e = (DragSourceDragEvent)ev;
            if (action == NONE) {
                int mods = e.getGestureModifiersEx() & KEY_MASK;
                if (mods == 0) {
                    action = getAcceptableDropAction(e.getTargetActions());
                }
            }
        }
        return action;
    }
View Full Code Here

    private void describe(String type, DragSourceEvent e) {
        if (false) {
            DragSourceContext ds = e.getDragSourceContext();
            String msg = "drag: " + type;
            if (e instanceof DragSourceDragEvent) {
                DragSourceDragEvent ev = (DragSourceDragEvent)e;
                msg += ": src=" + actionString(ds.getSourceActions())
                    + " usr=" + actionString(ev.getUserAction())
                    + " tgt=" + actionString(ev.getTargetActions())
                    + " act=" + actionString(ev.getDropAction())
                    + " mods=" + ev.getGestureModifiersEx();
            }
            else {
                msg += ": e=" + e;
            }
            if (!msg.equals(lastAction)) {
View Full Code Here

    }
   
    /** Get the currently requested drop action. */
    protected int getDropAction(DragSourceEvent ev) {
        if (ev instanceof DragSourceDragEvent) {
            DragSourceDragEvent e = (DragSourceDragEvent)ev;
            return e.getDropAction();
        }
        if (ev instanceof DragSourceDropEvent) {
            return ((DragSourceDropEvent)ev).getDropAction();
        }
        return NONE;
View Full Code Here

TOP

Related Classes of java.awt.dnd.DragSourceDragEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.