use of org.magic.game.gui.components.DraggablePanel in project MtgDesktopCompanion by nicho92.
the class CardTransfertHandler method exportDone.
@Override
protected void exportDone(JComponent c, Transferable data, int action) {
DisplayableCard src = (DisplayableCard) c;
if (action == TransferHandler.MOVE) {
dragLab.setIcon(null);
window.setVisible(false);
if (c.getParent() instanceof DraggablePanel) {
DraggablePanel dest = ((DraggablePanel) c.getParent());
if (dest.getMousePosition() != null)
src.setLocation(dest.getMousePosition());
dest.postTreatment(src);
}
}
}
Aggregations