Search
Diagram Methods
 


 Public Methods

  Name Description

addItem

Adds an item to the Diagram.

alignPointToGrid

Returns a point of the alignment grid nearest to the one passed as an argument.

arrange

Arranges the diagram with the given layout.

arrangeAnimated

Arranges the diagram using the given layout, and animates items moving to their new positions.

arrangeLinkLabels

Rearranges link labels whose autoArrange property is enabled.

cancelCompositeOperation

Stops recording undo/redo commands into a CompositeCommand and discards the records created so far.

clearAll

Removes all items from the diagram.

commitCompositeOperation

Stops recording undo/redo commands into a CompositeCommand and saves the composite in the history queue.

executeCommand

Executes the specified command on this diagram.

fromJson

Deserializes the diagram from a JSON string.

fromXmlDocument

Loads diagram contents from specified XML Document.

getContentBounds

Returns the smallest rectangle that bounds all diagram items.

getItemAt

Finds and returns the topmost DiagramItem found at the specified location.

getItemsAt

Finds and returns an array of the diagram items found at the specified location.

getLinkAt

Finds and returns the topmost DiagramLink found at the specified location.

getLinksAt

Finds and returns an array of the diagram DiagramLinks found at the specified location.

getNearestNode

Returns the node nearest to the specified point.

getNodeAt

Finds and returns the topmost DiagramNode found at the specified location.

getNodesAt

Finds and returns an array of the DiagramNodes found at the specified location.

isItemInteractive

Checks if the specified item can be modified interactively.

isItemVisible

Checks if the specified item is currently visible.

loadFromString

Loads diagram contents from specified XML or JSON string.

loadFromXml

Loads the diagram from an XML file.

raiseClicked

Raises an event which notifies that a Diagram item has been clicked.

raiseCreated

Raises an event which notifies that a Diagram item has been created.

raiseDeleted

Raises an event which notifies that a Diagram item has been deleted.

raiseDeselected

Raises an event which notifies that a Diagram item has been deselected.

raiseDoubleClicked

Raises an event which notifies that a Diagram item has been double-clicked.

raiseModified

Raises an event which notifies that a Diagram item has been modified.

raisePasted

Raises an event which notifies that a Diagram item has been pasted from clipboard.

raiseSelected

Raises an event which notifies that a Diagram item has been selected.

raiseSelecting

Raises an event which notifies that a Diagram item will be selected.

raiseSelectionChanged

Raises an event which notifies that the selection has changed.

redo

Executes again an action saved in the command history.

registerClass

Registers a diagram item class.

registerItemClass

Registers a diagram item class for XML serialization support.

removeItem

Removes the specified item from the Diagram.

resizeToFitItem

Resize the document extents so that the specified item is contained within.

resizeToFitItems

Resizes the document scrollable area so that it fits all diagram items.

routeAllLinks

Routes all links in the diagram in such a way they do not cross nodes.

saveToString

Encodes the diagram contents into an XML or JSON string.

saveToXml

Saves the diagram to an XML file.

startCompositeOperation

Starts recording undo/redo commands into a CompositeCommand.

toJson

Serializes the diagram into a JSON string.

toXmlDocument

Saves the diagram into an XML Document.

undo

Undoes an action saved in the command history.

 See Also