Class CopyPasteHandler
- java.lang.Object
- 
- com.inductiveautomation.ignition.designer.model.AbstractEditActionHandler
- 
- com.inductiveautomation.factorypmi.designer.workspace.CopyPasteHandler
 
 
- 
- All Implemented Interfaces:
- EditActionHandler
 
 public class CopyPasteHandler extends AbstractEditActionHandler 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringARCHIVE_TYPE_COMPONENTSstatic java.lang.StringARCHIVE_TYPE_KEYstatic java.lang.StringARCHIVE_TYPE_TEMPLATEstatic java.lang.StringARCHIVE_TYPE_WINDOW- 
Fields inherited from class com.inductiveautomation.ignition.designer.model.AbstractEditActionHandlerlistenerList
 
- 
 - 
Constructor SummaryConstructors Constructor Description CopyPasteHandler(WindowWorkspace workspace)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCopyPasteListener(CopyPasteListener listener)voidcancelPaste()Cancels and pending paste requests.booleancanCopy()Can this edit action handler handle the copy action, given its current selection? Note that if this andEditActionHandler.canDelete()both return true, the cut action will also be enabled.booleancanDelete()Can this edit action handler handle the delete action, given its current selection? Note that if this andEditActionHandler.canCopy()both return true, the cut action will also be enabled.booleancanPaste(java.awt.datatransfer.Clipboard clipboard)Can this action handler handle a paste given the data flavors currently available in the clipboard?booleancanPaste(java.awt.datatransfer.Transferable data)booleancanRename()Can this action handler handle the rename action, given its current selection.voiddispose()java.awt.datatransfer.TransferabledoCopy()Performs a copy operation on the current selection, returning the serialized XML results as aStringSelectionvoiddoCopyToClipboard()Performs a copy operation on the current selection, using the system clipboard to store the XML serialized data.java.awt.datatransfer.TransferabledoCut()Performs a cut operation on the current selection, returning the serialized XML results as aStringSelection.voiddoCutToClipboard()Performs a cut operation on the current selection, using the system clipboard to store the XML serialized data.voiddoDelete()Called when the delete action is performedvoiddoDuplicateSelection()Copies and then PasteImmediates the selection.voiddoPaste(VisionContainer dropContainer, java.awt.Point dropLocation)voiddoPaste(VisionContainer dropContainer, java.awt.Point dropLocation, boolean pasteAgain)voiddoPaste(java.awt.datatransfer.Transferable t)Called when the paste action is performedbooleandoPasteImpl(java.awt.datatransfer.Transferable t)voiddoRename()Called when the rename action is performedbooleanisPastePending()Returns whether or not a past is pending, which is caused by calling startPaste(), but not yet calling doPaste()voidremoveCopyPasteListener(CopyPasteListener listener)protected voidsetPastePending(boolean b)voidstartLegacyPaste(java.lang.String xml, boolean isWindow, boolean interactive)voidstartPaste(boolean interactive)Starts a paste using the contents of the clipboard.voidstartPaste(java.io.InputStream data, java.lang.String dataType, boolean interactive)Starts a paste operation using the data in the input stream.voidstartPaste(java.lang.String xml, boolean interactive)- 
Methods inherited from class com.inductiveautomation.ignition.designer.model.AbstractEditActionHandleraddChangeListener, fireChangeEvent, removeChangeListener
 
- 
 
- 
- 
- 
Field Detail- 
ARCHIVE_TYPE_KEYpublic static final java.lang.String ARCHIVE_TYPE_KEY - See Also:
- Constant Field Values
 
 - 
ARCHIVE_TYPE_WINDOWpublic static final java.lang.String ARCHIVE_TYPE_WINDOW - See Also:
- Constant Field Values
 
 - 
ARCHIVE_TYPE_TEMPLATEpublic static final java.lang.String ARCHIVE_TYPE_TEMPLATE - See Also:
- Constant Field Values
 
 - 
ARCHIVE_TYPE_COMPONENTSpublic static final java.lang.String ARCHIVE_TYPE_COMPONENTS - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
CopyPasteHandlerpublic CopyPasteHandler(WindowWorkspace workspace) 
 
- 
 - 
Method Detail- 
disposepublic void dispose() 
 - 
canDeletepublic boolean canDelete() Description copied from interface:EditActionHandlerCan this edit action handler handle the delete action, given its current selection? Note that if this andEditActionHandler.canCopy()both return true, the cut action will also be enabled.
 - 
canCopypublic boolean canCopy() Description copied from interface:EditActionHandlerCan this edit action handler handle the copy action, given its current selection? Note that if this andEditActionHandler.canDelete()both return true, the cut action will also be enabled.
 - 
canPastepublic boolean canPaste(java.awt.datatransfer.Clipboard clipboard) Description copied from interface:EditActionHandlerCan this action handler handle a paste given the data flavors currently available in the clipboard?
 - 
canPastepublic boolean canPaste(java.awt.datatransfer.Transferable data) 
 - 
startLegacyPastepublic void startLegacyPaste(java.lang.String xml, boolean isWindow, boolean interactive)
 - 
startPastepublic void startPaste(boolean interactive) Starts a paste using the contents of the clipboard.
 - 
startPastepublic void startPaste(java.lang.String xml, boolean interactive)
 - 
doPastepublic void doPaste(VisionContainer dropContainer, java.awt.Point dropLocation) 
 - 
doPastepublic void doPaste(VisionContainer dropContainer, java.awt.Point dropLocation, boolean pasteAgain) 
 - 
startPastepublic void startPaste(java.io.InputStream data, java.lang.String dataType, boolean interactive)Starts a paste operation using the data in the input stream.- Parameters:
- data- The data for the past (xml)
- dataType- Should be one of:
- interactive- If true, the workspace will switch to the paste tool. If not, you should call doPaste after calling startPaste
 
 - 
cancelPastepublic void cancelPaste() Cancels and pending paste requests. Has no effect if not currently paste pending
 - 
isPastePendingpublic boolean isPastePending() Returns whether or not a past is pending, which is caused by calling startPaste(), but not yet calling doPaste()
 - 
setPastePendingprotected void setPastePending(boolean b) 
 - 
doDeletepublic void doDelete() Description copied from interface:EditActionHandlerCalled when the delete action is performed
 - 
doDuplicateSelectionpublic void doDuplicateSelection() Copies and then PasteImmediates the selection. Doesn't use the clipboard. Doesn't work on root containers.
 - 
doCopyToClipboardpublic void doCopyToClipboard() Performs a copy operation on the current selection, using the system clipboard to store the XML serialized data.
 - 
doCutToClipboardpublic void doCutToClipboard() Performs a cut operation on the current selection, using the system clipboard to store the XML serialized data.
 - 
doCopypublic java.awt.datatransfer.Transferable doCopy() Performs a copy operation on the current selection, returning the serialized XML results as aStringSelection- Returns:
- the current selection as a Transferable, or null if the copy failed. Will be added to the system clipboard.
 
 - 
doCutpublic java.awt.datatransfer.Transferable doCut() Performs a cut operation on the current selection, returning the serialized XML results as aStringSelection.- Returns:
- the current selection as a Transferable, or null if the cut failed. Will be added to the system clipboard.
 
 - 
doPastepublic void doPaste(java.awt.datatransfer.Transferable t) Description copied from interface:EditActionHandlerCalled when the paste action is performed- Parameters:
- t- The current contents of the clipboard to paste.
 
 - 
doPasteImplpublic boolean doPasteImpl(java.awt.datatransfer.Transferable t) 
 - 
addCopyPasteListenerpublic void addCopyPasteListener(CopyPasteListener listener) 
 - 
removeCopyPasteListenerpublic void removeCopyPasteListener(CopyPasteListener listener) 
 - 
canRenamepublic boolean canRename() Description copied from interface:EditActionHandlerCan this action handler handle the rename action, given its current selection.- Returns:
- true, if the node can be renamed
 
 - 
doRenamepublic void doRename() Description copied from interface:EditActionHandlerCalled when the rename action is performed
 
- 
 
-