mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't leak from DndEventImpl
This commit is contained in:
@@ -52,14 +52,12 @@ public class DnDEventImpl extends UserDataHolderBase implements Transferable, Dn
|
||||
private boolean myShouldRemoveHighlighter = true;
|
||||
private Point myLocalPoint;
|
||||
private Cursor myCursor;
|
||||
private DnDSource mySource;
|
||||
|
||||
public DnDEventImpl(DnDManagerImpl manager, DnDAction action, Object attachedObject, Point point, DnDSource source) {
|
||||
public DnDEventImpl(DnDManagerImpl manager, DnDAction action, Object attachedObject, Point point) {
|
||||
myManager = manager;
|
||||
myAction = action;
|
||||
myAttachedObject = attachedObject;
|
||||
myPoint = point;
|
||||
mySource = source;
|
||||
}
|
||||
|
||||
public DnDAction getAction() {
|
||||
@@ -249,7 +247,7 @@ public class DnDEventImpl extends UserDataHolderBase implements Transferable, Dn
|
||||
}
|
||||
|
||||
protected Object clone() {
|
||||
final DnDEventImpl result = new DnDEventImpl(myManager, myAction, myAttachedObject, myPoint, mySource);
|
||||
final DnDEventImpl result = new DnDEventImpl(myManager, myAction, myAttachedObject, myPoint);
|
||||
result.myDropHandler = myDropHandler;
|
||||
result.myDropPossible = myDropPossible;
|
||||
result.myExpectedDropResult = myExpectedDropResult;
|
||||
|
||||
@@ -179,7 +179,7 @@ public class DnDManagerImpl extends DnDManager implements Disposable {
|
||||
DnDEventImpl event = (DnDEventImpl)jComp.getClientProperty(DnDNativeTarget.EVENT_KEY);
|
||||
if (event == null) {
|
||||
DnDNativeTarget.EventInfo info = new DnDNativeTarget.EventInfo(flavors, transferable);
|
||||
event = new DnDEventImpl(this, DnDAction.COPY, info, aPoint, null);
|
||||
event = new DnDEventImpl(this, DnDAction.COPY, info, aPoint);
|
||||
jComp.putClientProperty(DnDNativeTarget.EVENT_KEY, event);
|
||||
}
|
||||
|
||||
@@ -556,7 +556,7 @@ public class DnDManagerImpl extends DnDManager implements Disposable {
|
||||
LOG.debug("Starting dragging for " + action);
|
||||
hideCurrentHighlighter();
|
||||
final DnDDragStartBean dnDDragStartBean = source.startDragging(action, dge.getDragOrigin());
|
||||
myCurrentEvent = new DnDEventImpl(DnDManagerImpl.this, action, dnDDragStartBean.getAttachedObject(), dnDDragStartBean.getPoint(), source);
|
||||
myCurrentEvent = new DnDEventImpl(DnDManagerImpl.this, action, dnDDragStartBean.getAttachedObject(), dnDDragStartBean.getPoint());
|
||||
myCurrentEvent.setOrgPoint(dge.getDragOrigin());
|
||||
|
||||
Pair<Image, Point> pair = source.createDraggedImage(action, dge.getDragOrigin());
|
||||
|
||||
Reference in New Issue
Block a user