IBM ILOG Dojo Diagrammer 1.1.1 API Documentation
Legend: Array Boolean Constructor Date DomNode Error Function Namespace Number Object RegExp Singleton String

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

clear
This method clears the clipboard and signals the event "/ibm_diagram/Clipboard/cleared".
constructor
creates a new clipboard instance, initializing a new serializer.
ParameterTypeDescription
diagram
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
Get the delta used to compute _nextPasteLocation.
ParameterTypeDescription
value
getSerializer
returns the pre-configured serializer, ready for the copy-paste action. return: ibm_ilog.diagram.editor.DiagramSerializers
paste
Pastes previously copied content into the diagram.
ParameterTypeDescription
pasteContaineribm_ilog.diagram.GraphThe Graph into which the contents of the clipboard are going to be pasted.
pasteLocation
setNextPasteLocationDelta
Set the delta used to compute _nextPasteLocation.
ParameterTypeDescription
value

Events

onDeserialize
this function is called when a graphElement is deserialized in the local Serializer. The user can connect to this method to customize the deserialization.
ParameterTypeDescription
serializedDataJSObjectthe serialized version of the GraphElement
newGraphElementibm_ilog.diagram.GraphElementthe deserialized GraphElement
containeribm_ilog.diagram.Graphthe container object where the newGraphElement is hold
undoActionibm_ilog.diagram.editor.undo.UserCustomizedActionthe 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
onSerialize
this function is called when a graphElement is serialized in the local Serializer. The user can connect to this method to customize the serialization.
ParameterTypeDescription
graphElementibm_ilog.diagram.GraphElementthe GraphElement to be serialized
serializedDataJSObjectthe serialized version of the GraphElement