|
|
@ -1,12 +1,11 @@ |
|
|
|
package com.fr.design.mainframe; |
|
|
|
package com.fr.design.mainframe; |
|
|
|
|
|
|
|
|
|
|
|
import java.awt.datatransfer.Transferable; |
|
|
|
import com.fr.design.designer.beans.events.DesignerEvent; |
|
|
|
|
|
|
|
import com.fr.design.designer.beans.models.AddingModel; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.JComponent; |
|
|
|
import javax.swing.JComponent; |
|
|
|
import javax.swing.TransferHandler; |
|
|
|
import javax.swing.TransferHandler; |
|
|
|
|
|
|
|
import java.awt.datatransfer.Transferable; |
|
|
|
import com.fr.design.designer.beans.events.DesignerEvent; |
|
|
|
|
|
|
|
import com.fr.design.designer.beans.models.AddingModel; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class DesignerTransferHandler extends TransferHandler { |
|
|
|
public class DesignerTransferHandler extends TransferHandler { |
|
|
|
|
|
|
|
|
|
|
@ -20,7 +19,7 @@ public class DesignerTransferHandler extends TransferHandler { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void exportDone(JComponent source, Transferable data, int action) { |
|
|
|
protected void exportDone(JComponent source, Transferable data, int action) { |
|
|
|
if (!addingModel.isCreatorAdded()) { |
|
|
|
if (!addingModel.isCreatorAdded() && !addingModel.isNeedUndoWhenAddingFailed()) { |
|
|
|
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_CUTED); |
|
|
|
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_CUTED); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|