Search
DiagramItem Methods
 


 Public Methods

  Name Description

addCanvasElements

Derived classes must implement this method by adding their graphics primitives to the canvas.elements collection.

allowDrag

Invoked to validate the drag operation.

clone

Creates a copy of this item.

containsPoint

Determines whether this item contains the specified point.

endDrag

Invoked when the user stops dragging this item.

fromJson

Deserializes this item from a JSON object.

getRepaintBounds

Gets the repaint region for this item, taking into account factors such as pen width, selection handles and shadow.

hitTest

Returns the diagram item that contains the specified point.

invalidate

Invalidates the region of the canvas, that matches the item's repaint bounds.

loadFromXml

Loads the item content from an XML element.

onRemove

Called when an item is removed from a Diagram, either by the user, programmatically or via undo / redo.

removeCanvasElements

Derived classes must implement this method by removing their graphics primitives from the canvas.elements collection.

restoreState

Loads the properties of this diagram item.

saveLocationState

Saves the state of this DiagramItem.

saveState

Saves the properties of this diagram item.

saveToXml

Saves the item content into an XML element.

startDrag

Invoked when the user starts dragging this item.

toJson

Serializes this item into a JSON object.

updateCanvasElements

Derived classes must implement this method to update the item's visual elements.

updateDrag

Invoked while the user drags this item.

 See Also