/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* AWT Button is a DragSource and also a transferable object
*/
private transient int dropAction;
private final int dragOperation = DnDConstants.ACTION_COPY | DnDConstants.ACTION_MOVE | DnDConstants.ACTION_LINK;
super(label);
this,
this
);
dragSource.addDragSourceListener(this);
}
public void changeCursor(
int ra
) {
else
}
/**
* a Drag gesture has been recognized
*/
try {
if (DragSource.isDragImageSupported()) {
null,
R -= 5;
}
}.getImage(),
this,
this);
} else {
null,
this,
this);
}
} catch (InvalidDnDOperationException e) {
e.printStackTrace();
}
}
/**
* as the hotspot enters a platform dependent drop site
*/
);
}
/**
* as the hotspot moves over a platform dependent drop site
*/
);
}
/**
* as the hotspot exits a platform dependent drop site
*/
);
}
/**
* as the operation changes
*/
);
}
/**
* as the operation completes
*/
}
}
return new DataFlavor[]{df};
}
}
throw new UnsupportedFlavorException(tdf);
}
switch (dropAction) {
case DnDConstants.ACTION_COPY:
try {
} catch (CloneNotSupportedException e) {
oos.writeObject(this);
try {
} catch (ClassNotFoundException cnfe) {
// do nothing
}
}
return copy;
case DnDConstants.ACTION_MOVE:
synchronized (this) {
}
}
return this;
case DnDConstants.ACTION_LINK:
return this;
default:
return null;
}
}
}