java.awt.dnd.peer.DropTargetPeer Java Examples

The following examples show how to use java.awt.dnd.peer.DropTargetPeer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DropTarget.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #2
Source File: DropTarget.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #3
Source File: DropTarget.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #4
Source File: DropTarget.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #5
Source File: DropTarget.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #6
Source File: DropTarget.java    From Java8CN with Apache License 2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #7
Source File: DropTarget.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #8
Source File: DropTarget.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #9
Source File: DropTarget.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 */
public void addNotify() {
    final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
    ComponentPeer peer = acc.getPeer(component);
    if (peer == null || peer == componentPeer) {
        return;
    }

    componentPeer = peer;


    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = acc.getPeer(c);
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = (DropTargetPeer) peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #10
Source File: DropTarget.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 */
public void addNotify() {
    final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
    ComponentPeer peer = acc.getPeer(component);
    if (peer == null || peer == componentPeer) {
        return;
    }

    componentPeer = peer;


    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = acc.getPeer(c);
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = (DropTargetPeer) peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #11
Source File: DropTarget.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #12
Source File: DropTarget.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #13
Source File: DropTarget.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #14
Source File: DropTarget.java    From jdk-1.7-annotated with Apache License 2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #15
Source File: DropTarget.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #16
Source File: DropTarget.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #17
Source File: DropTarget.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #18
Source File: DropTarget.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Notify the DropTarget that it has been associated with a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.addNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been associated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * association of the ComponentPeer with the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are associated with!
 *
 */

public void addNotify(ComponentPeer peer) {
    if (peer == componentPeer) return;

    componentPeer = peer;

    for (Component c = component;
         c != null && peer instanceof LightweightPeer; c = c.getParent()) {
        peer = c.getPeer();
    }

    if (peer instanceof DropTargetPeer) {
        nativePeer = peer;
        ((DropTargetPeer)peer).addDropTarget(this);
    } else {
        nativePeer = null;
    }
}
 
Example #19
Source File: DropTarget.java    From jdk8u-jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Notify the DropTarget that it has been disassociated from a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.removeNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been disassociated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * disassociation of the ComponentPeer from the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are being disassociated from!
 */

public void removeNotify(ComponentPeer peer) {
    if (nativePeer != null)
        ((DropTargetPeer)nativePeer).removeDropTarget(this);

    componentPeer = nativePeer = null;

    synchronized (this) {
        if (isDraggingInside) {
            dragExit(new DropTargetEvent(getDropTargetContext()));
        }
    }
}
 
Example #20
Source File: DropTarget.java    From jdk8u_jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Notify the DropTarget that it has been disassociated from a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.removeNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been disassociated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * disassociation of the ComponentPeer from the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are being disassociated from!
 */

public void removeNotify(ComponentPeer peer) {
    if (nativePeer != null)
        ((DropTargetPeer)nativePeer).removeDropTarget(this);

    componentPeer = nativePeer = null;

    synchronized (this) {
        if (isDraggingInside) {
            dragExit(new DropTargetEvent(getDropTargetContext()));
        }
    }
}
 
Example #21
Source File: DropTarget.java    From jdk8u-jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Notify the DropTarget that it has been disassociated from a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.removeNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been disassociated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * disassociation of the ComponentPeer from the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are being disassociated from!
 */

public void removeNotify(ComponentPeer peer) {
    if (nativePeer != null)
        ((DropTargetPeer)nativePeer).removeDropTarget(this);

    componentPeer = nativePeer = null;

    synchronized (this) {
        if (isDraggingInside) {
            dragExit(new DropTargetEvent(getDropTargetContext()));
        }
    }
}
 
Example #22
Source File: DropTarget.java    From jdk-1.7-annotated with Apache License 2.0 3 votes vote down vote up
/**
 * Notify the DropTarget that it has been disassociated from a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.removeNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been disassociated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * disassociation of the ComponentPeer from the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are being disassociated from!
 */

public void removeNotify(ComponentPeer peer) {
    if (nativePeer != null)
        ((DropTargetPeer)nativePeer).removeDropTarget(this);

    componentPeer = nativePeer = null;
}
 
Example #23
Source File: DropTarget.java    From openjdk-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Notify the DropTarget that it has been disassociated from a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.removeNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been disassociated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * disassociation of the ComponentPeer from the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are being disassociated from!
 */

public void removeNotify(ComponentPeer peer) {
    if (nativePeer != null)
        ((DropTargetPeer)nativePeer).removeDropTarget(this);

    componentPeer = nativePeer = null;

    synchronized (this) {
        if (isDraggingInside) {
            dragExit(new DropTargetEvent(getDropTargetContext()));
        }
    }
}
 
Example #24
Source File: DropTarget.java    From jdk8u-dev-jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Notify the DropTarget that it has been disassociated from a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.removeNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been disassociated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * disassociation of the ComponentPeer from the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are being disassociated from!
 */

public void removeNotify(ComponentPeer peer) {
    if (nativePeer != null)
        ((DropTargetPeer)nativePeer).removeDropTarget(this);

    componentPeer = nativePeer = null;

    synchronized (this) {
        if (isDraggingInside) {
            dragExit(new DropTargetEvent(getDropTargetContext()));
        }
    }
}
 
Example #25
Source File: DropTarget.java    From openjdk-8-source with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Notify the DropTarget that it has been disassociated from a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.removeNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been disassociated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * disassociation of the ComponentPeer from the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are being disassociated from!
 */

public void removeNotify(ComponentPeer peer) {
    if (nativePeer != null)
        ((DropTargetPeer)nativePeer).removeDropTarget(this);

    componentPeer = nativePeer = null;

    synchronized (this) {
        if (isDraggingInside) {
            dragExit(new DropTargetEvent(getDropTargetContext()));
        }
    }
}
 
Example #26
Source File: DropTarget.java    From hottub with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Notify the DropTarget that it has been disassociated from a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.removeNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been disassociated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * disassociation of the ComponentPeer from the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are being disassociated from!
 */

public void removeNotify(ComponentPeer peer) {
    if (nativePeer != null)
        ((DropTargetPeer)nativePeer).removeDropTarget(this);

    componentPeer = nativePeer = null;

    synchronized (this) {
        if (isDraggingInside) {
            dragExit(new DropTargetEvent(getDropTargetContext()));
        }
    }
}
 
Example #27
Source File: DropTarget.java    From Java8CN with Apache License 2.0 3 votes vote down vote up
/**
 * Notify the DropTarget that it has been disassociated from a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.removeNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been disassociated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * disassociation of the ComponentPeer from the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are being disassociated from!
 */

public void removeNotify(ComponentPeer peer) {
    if (nativePeer != null)
        ((DropTargetPeer)nativePeer).removeDropTarget(this);

    componentPeer = nativePeer = null;

    synchronized (this) {
        if (isDraggingInside) {
            dragExit(new DropTargetEvent(getDropTargetContext()));
        }
    }
}
 
Example #28
Source File: DropTarget.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Notify the DropTarget that it has been disassociated from a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.removeNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been disassociated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * disassociation of the ComponentPeer from the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are being disassociated from!
 */

public void removeNotify(ComponentPeer peer) {
    if (nativePeer != null)
        ((DropTargetPeer)nativePeer).removeDropTarget(this);

    componentPeer = nativePeer = null;

    synchronized (this) {
        if (isDraggingInside) {
            dragExit(new DropTargetEvent(getDropTargetContext()));
        }
    }
}
 
Example #29
Source File: DropTarget.java    From openjdk-jdk8u with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Notify the DropTarget that it has been disassociated from a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.removeNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been disassociated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * disassociation of the ComponentPeer from the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are being disassociated from!
 */

public void removeNotify(ComponentPeer peer) {
    if (nativePeer != null)
        ((DropTargetPeer)nativePeer).removeDropTarget(this);

    componentPeer = nativePeer = null;

    synchronized (this) {
        if (isDraggingInside) {
            dragExit(new DropTargetEvent(getDropTargetContext()));
        }
    }
}
 
Example #30
Source File: DropTarget.java    From JDKSourceCode1.8 with MIT License 3 votes vote down vote up
/**
 * Notify the DropTarget that it has been disassociated from a Component
 *
 **********************************************************************
 * This method is usually called from java.awt.Component.removeNotify() of
 * the Component associated with this DropTarget to notify the DropTarget
 * that a ComponentPeer has been disassociated with that Component.
 *
 * Calling this method, other than to notify this DropTarget of the
 * disassociation of the ComponentPeer from the Component may result in
 * a malfunction of the DnD system.
 **********************************************************************
 * <P>
 * @param peer The Peer of the Component we are being disassociated from!
 */

public void removeNotify(ComponentPeer peer) {
    if (nativePeer != null)
        ((DropTargetPeer)nativePeer).removeDropTarget(this);

    componentPeer = nativePeer = null;

    synchronized (this) {
        if (isDraggingInside) {
            dragExit(new DropTargetEvent(getDropTargetContext()));
        }
    }
}