MindFusion.Diagramming for JavaScript Programmer's Guide

DiagramItem Members

Constructors Methods
 


Represents an item in the diagram document. All classes representing diagram elements derive from DiagramItem.

The following tables list the members exposed by the DiagramItem type.

 Public Constructors

  Name Description

DiagramItem

Initializes a new instance of the DiagramItem class.

 Public Methods

  Name Description

addCanvasElements

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

addHandlesToCanvas

Invoked when the item's selection handles should be added to the diagram's Canvas object.

allowDrag

Invoked to validate the drag operation.

cancelDrag

Invoked when the interactive modification of this object has been canceled.

containsPoint

Determines whether this item contains the specified point.

getBrush

Gets the object that specifies how to paint the interior of the DiagramItem.

getFont

Gets the font used to render this item's text.

getIgnoreLayout

Gets a value indicating whether the position of this item should not be changed by automatic layout methods.

getLocked

Gets a value indicating whether users are allowed to modify this item.

getParent

Gets the parent diagram.

getPen

Gets an object used to paint the frame of the item.

getSelected

Gets a value indicating whether a DiagramItem is selected.

getTag

Gets the tag of the item.

getText

Gets the string containing the DiagramItem's text.

getTextColor

Gets a string specifying the color of the text of this item.

getVisible

Gets a value indicating whether this item is visible.

getZIndex

Gets the z-order position of the object.

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.

removeHandlesFromCanvas

Invoked when the item's selection handles should be removed.

saveLocationState

Saves the state of this DiagramItem.

setBrush

Sets an object that specifies how to paint the interior of the DiagramItem.

setFont

Sets the font used to render this item's text.

setIgnoreLayout

Sets a value indicating whether the position of this item should not be changed by automatic layout methods.

setLocked

Sets a value indicating whether users are allowed to modify this item.

setPen

Sets an object used to paint the frame of the item.

setSelected

Sets a value indicating whether a DiagramItem is selected.

setTag

Lets you set any object as a tag for this item.

setText

Sets a string containing the DiagramItem's text.

setTextColor

Sets a string specifying the color of the text of this item.

setVisible

Sets a value indicating whether this item is visible.

setZIndex

Sets the z-order position of the object.

startDrag

Invoked when the user starts dragging this item.

updateCanvasElements

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

updateDrag

Invoked while the user drags this item.

 See Also