Interface that helps in clipboard actions that can be associated with each
IModelItem
in the context where clipboards are needed.
public function copy(item:Object):Object
This method is called during the copy operation of the given item to retrieve additional state
that can be later used during a operation.
Parameters
| item:Object — The item to copy to the clipboard.
|
Returns
| Object — A custom user object that will later be provided to Paste.
|
public function cut(item:Object):Object
This method is called during the cut operation of the given item to retrieve additional state
that can be later used during a operation.
Parameters
| item:Object — The item to cut to the clipboard.
|
Returns
| Object — A custom user object that will later be provided to Paste.
|
public function paste(item:Object, userData:Object):void
This method is called after the item has been pasted from the clipboard.
Parameters
| item:Object — The item that has been created during the paste operation.
|
| |
| userData:Object — The data that had been queried during Cut or
Copy respectively.
|
public function shouldCopy(item:Object):Boolean
Determines whether the given item can or should be copied to the clipboard.
Parameters
| item:Object — The item to copy.
|
Returns
| Boolean — true, if this item should be copied.
|
public function shouldCut(item:Object):Boolean
Determines whether the given item can or should be cut to the clipboard.
Parameters
| item:Object — The item to copy.
|
Returns
| Boolean — true, if this item should be cut.
|
public function shouldPaste(item:Object, userData:Object):Boolean
Determines whether the given item can or should be pasted from the clipboard to the target graph.
Parameters
| item:Object — The item in the clipboard.
|
| |
| userData:Object — The state memento that had been created during cut or copy.
|
Returns
| Boolean — true, if this item should be pasted.
|