ibm_ilog.diagram.editor.Clipboard
Object » ibm_ilog.diagram.editor.Clipboard
dojo.require("ibm_ilog.diagram.editor.Clipboard");
creates a new clipboard instance, initializing a new serializer.
Method Summary
- clear() This method clears the clipboard and signals the event "/ibm_diagram/Clipboard/cleared".
- constructor(diagram) creates a new clipboard instance, initializing a new serializer.
- copy() This method serializes the selected elements to the clipboard, and save it for further paste.
- cut() This method serializes the selected elements to the clipboard, and save it for further paste. Also deletes the selected elements after the copy.
- getDiagram() returns the associated diagram. return: ibm_ilog.diagram.editor.DiagramEditor
- getNextPasteLocationDelta(value) Get the delta used to compute _nextPasteLocation.
- getSerializer() returns the pre-configured serializer, ready for the copy-paste action. return: ibm_ilog.diagram.editor.DiagramSerializers
- paste(pasteContainer, pasteLocation) Pastes previously copied content into the diagram.
- setNextPasteLocationDelta(value) Set the delta used to compute _nextPasteLocation.
Event Summary
- onDeserialize(serializedData, newGraphElement, container, undoAction) this function is called when a graphElement is deserialized in the local Serializer. The user can connect to this method to customize the deserialization.
- onSerialize(graphElement, serializedData) this function is called when a graphElement is serialized in the local Serializer. The user can connect to this method to customize the serialization.
Methods
creates a new clipboard instance, initializing a new serializer.
Parameter | Type | Description |
---|---|---|
diagram |
This method serializes the selected elements to the clipboard, and save it for further paste.
Also deletes the selected elements after the copy.
Get the delta used to compute _nextPasteLocation.
Parameter | Type | Description |
---|---|---|
value |
returns the pre-configured serializer, ready for the copy-paste action.
return: ibm_ilog.diagram.editor.DiagramSerializers
Pastes previously copied content into the diagram.
Parameter | Type | Description |
---|---|---|
pasteContainer | ibm_ilog.diagram.Graph | The Graph into which the contents of the clipboard are going to be pasted. |
pasteLocation |
Set the delta used to compute _nextPasteLocation.
Parameter | Type | Description |
---|---|---|
value |
Events
this function is called when a graphElement is deserialized in the local Serializer.
The user can connect to this method to customize the deserialization.
Parameter | Type | Description |
---|---|---|
serializedData | JSObject | the serialized version of the GraphElement |
newGraphElement | ibm_ilog.diagram.GraphElement | the deserialized GraphElement |
container | ibm_ilog.diagram.Graph | the container object where the newGraphElement is hold |
undoAction | ibm_ilog.diagram.editor.undo.UserCustomizedAction | the undo Action to be added to the UndoManager. If the serialized object is a link, this Action will be an instance of ibm_ilog.diagram.editor.undo.ConnectAction. In other case it will be a ibm_ilog.diagram.editor.undo.PasteNodeAction |
this function is called when a graphElement is serialized in the local Serializer.
The user can connect to this method to customize the serialization.
Parameter | Type | Description |
---|---|---|
graphElement | ibm_ilog.diagram.GraphElement | the GraphElement to be serialized |
serializedData | JSObject | the serialized version of the GraphElement |