Java源码示例:sun.lwawt.macosx.CDropTarget
示例1
@Override
public void addDropTarget(DropTarget dt) {
LWWindowPeer winPeer = getWindowPeerOrSelf();
if (winPeer != null && winPeer != this) {
// We need to register the DropTarget in the
// peer of the window ancestor of the component
winPeer.addDropTarget(dt);
} else {
synchronized (dropTargetLock) {
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if (++fNumDropTargets == 1) {
// Having a non-null drop target would be an error but let's check just in case:
if (fDropTarget != null)
System.err.println("CComponent.addDropTarget(): current drop target is non-null.");
// Create a new drop target:
fDropTarget = CDropTarget.createDropTarget(dt, target, this);
}
}
}
}
示例2
@Override
public void addDropTarget(DropTarget dt) {
LWWindowPeer winPeer = getWindowPeerOrSelf();
if (winPeer != null && winPeer != this) {
// We need to register the DropTarget in the
// peer of the window ancestor of the component
winPeer.addDropTarget(dt);
} else {
synchronized (dropTargetLock) {
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if (++fNumDropTargets == 1) {
// Having a non-null drop target would be an error but let's check just in case:
if (fDropTarget != null)
System.err.println("CComponent.addDropTarget(): current drop target is non-null.");
// Create a new drop target:
fDropTarget = CDropTarget.createDropTarget(dt, target, this);
}
}
}
}
示例3
@Override
public void addDropTarget(DropTarget dt) {
LWWindowPeer winPeer = getWindowPeerOrSelf();
if (winPeer != null && winPeer != this) {
// We need to register the DropTarget in the
// peer of the window ancestor of the component
winPeer.addDropTarget(dt);
} else {
synchronized (dropTargetLock) {
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if (++fNumDropTargets == 1) {
// Having a non-null drop target would be an error but let's check just in case:
if (fDropTarget != null)
System.err.println("CComponent.addDropTarget(): current drop target is non-null.");
// Create a new drop target:
fDropTarget = CDropTarget.createDropTarget(dt, target, this);
}
}
}
}
示例4
@Override
public void addDropTarget(DropTarget dt) {
LWWindowPeer winPeer = getWindowPeerOrSelf();
if (winPeer != null && winPeer != this) {
// We need to register the DropTarget in the
// peer of the window ancestor of the component
winPeer.addDropTarget(dt);
} else {
synchronized (dropTargetLock) {
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if (++fNumDropTargets == 1) {
// Having a non-null drop target would be an error but let's check just in case:
if (fDropTarget != null)
System.err.println("CComponent.addDropTarget(): current drop target is non-null.");
// Create a new drop target:
fDropTarget = CDropTarget.createDropTarget(dt, target, this);
}
}
}
}
示例5
@Override
public void addDropTarget(DropTarget dt) {
LWWindowPeer winPeer = getWindowPeerOrSelf();
if (winPeer != null && winPeer != this) {
// We need to register the DropTarget in the
// peer of the window ancestor of the component
winPeer.addDropTarget(dt);
} else {
synchronized (dropTargetLock) {
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if (++fNumDropTargets == 1) {
// Having a non-null drop target would be an error but let's check just in case:
if (fDropTarget != null)
System.err.println("CComponent.addDropTarget(): current drop target is non-null.");
// Create a new drop target:
fDropTarget = CDropTarget.createDropTarget(dt, target, this);
}
}
}
}
示例6
@Override
public void addDropTarget(DropTarget dt) {
LWWindowPeer winPeer = getWindowPeerOrSelf();
if (winPeer != null && winPeer != this) {
// We need to register the DropTarget in the
// peer of the window ancestor of the component
winPeer.addDropTarget(dt);
} else {
synchronized (dropTargetLock) {
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if (++fNumDropTargets == 1) {
// Having a non-null drop target would be an error but let's check just in case:
if (fDropTarget != null)
System.err.println("CComponent.addDropTarget(): current drop target is non-null.");
// Create a new drop target:
fDropTarget = CDropTarget.createDropTarget(dt, target, this);
}
}
}
}
示例7
@Override
public void addDropTarget(DropTarget dt) {
LWWindowPeer winPeer = getWindowPeerOrSelf();
if (winPeer != null && winPeer != this) {
// We need to register the DropTarget in the
// peer of the window ancestor of the component
winPeer.addDropTarget(dt);
} else {
synchronized (dropTargetLock) {
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if (++fNumDropTargets == 1) {
// Having a non-null drop target would be an error but let's check just in case:
if (fDropTarget != null)
System.err.println("CComponent.addDropTarget(): current drop target is non-null.");
// Create a new drop target:
fDropTarget = CDropTarget.createDropTarget(dt, target, this);
}
}
}
}
示例8
@Override
public void addDropTarget(DropTarget dt) {
LWWindowPeer winPeer = getWindowPeerOrSelf();
if (winPeer != null && winPeer != this) {
// We need to register the DropTarget in the
// peer of the window ancestor of the component
winPeer.addDropTarget(dt);
} else {
synchronized (dropTargetLock) {
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if (++fNumDropTargets == 1) {
// Having a non-null drop target would be an error but let's check just in case:
if (fDropTarget != null)
System.err.println("CComponent.addDropTarget(): current drop target is non-null.");
// Create a new drop target:
fDropTarget = CDropTarget.createDropTarget(dt, target, this);
}
}
}
}
示例9
@Override
public void addDropTarget(DropTarget dt) {
LWWindowPeer winPeer = getWindowPeerOrSelf();
if (winPeer != null && winPeer != this) {
// We need to register the DropTarget in the
// peer of the window ancestor of the component
winPeer.addDropTarget(dt);
} else {
synchronized (dropTargetLock) {
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if (++fNumDropTargets == 1) {
// Having a non-null drop target would be an error but let's check just in case:
if (fDropTarget != null)
System.err.println("CComponent.addDropTarget(): current drop target is non-null.");
// Create a new drop target:
fDropTarget = CDropTarget.createDropTarget(dt, target, this);
}
}
}
}
示例10
@Override
public void addDropTarget(DropTarget dt) {
LWWindowPeer winPeer = getWindowPeerOrSelf();
if (winPeer != null && winPeer != this) {
// We need to register the DropTarget in the
// peer of the window ancestor of the component
winPeer.addDropTarget(dt);
} else {
synchronized (dropTargetLock) {
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if (++fNumDropTargets == 1) {
// Having a non-null drop target would be an error but let's check just in case:
if (fDropTarget != null)
System.err.println("CComponent.addDropTarget(): current drop target is non-null.");
// Create a new drop target:
fDropTarget = CDropTarget.createDropTarget(dt, target, this);
}
}
}
}
示例11
@Override
public void addDropTarget(DropTarget dt) {
LWWindowPeer winPeer = getWindowPeerOrSelf();
if (winPeer != null && winPeer != this) {
// We need to register the DropTarget in the
// peer of the window ancestor of the component
winPeer.addDropTarget(dt);
} else {
synchronized (dropTargetLock) {
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if (++fNumDropTargets == 1) {
// Having a non-null drop target would be an error but let's check just in case:
if (fDropTarget != null)
System.err.println("CComponent.addDropTarget(): current drop target is non-null.");
// Create a new drop target:
fDropTarget = CDropTarget.createDropTarget(dt, target, this);
}
}
}
}
示例12
@Override
public void addDropTarget(DropTarget dt) {
LWWindowPeer winPeer = getWindowPeerOrSelf();
if (winPeer != null && winPeer != this) {
// We need to register the DropTarget in the
// peer of the window ancestor of the component
winPeer.addDropTarget(dt);
} else {
synchronized (dropTargetLock) {
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if (++fNumDropTargets == 1) {
// Having a non-null drop target would be an error but let's check just in case:
if (fDropTarget != null)
System.err.println("CComponent.addDropTarget(): current drop target is non-null.");
// Create a new drop target:
fDropTarget = CDropTarget.createDropTarget(dt, target, this);
}
}
}
}