The DiagramItem class represents an element in a diagram. It defines the basic drawing, interaction, undo/redo and serialization functionality for all the types of elements that can be contained in DroidDiagram documents.
Namespace: com.mindfusion.diagramming
Package: com.mindfusion.diagramming
Java
![]() |
---|
public abstract class DiagramItem implements Externalizable |
The interior and borders of the diagram items are painted using the brush and pen specified by setBrush and setPen. The font of items text is set by the setFont method.
The order in which items are painted from bottom to top is called the Z-order. Moving items up or down the Z-order can be done by means of the zBottom, zTop, zLevelUp and zLevelDown methods. Accessing and setting the index of an item in the Z-order can be done using setZIndex and getZIndex.
A hierarchy of items can be built, such that when an item higher in the hierarchy is moved, all subordinated items move too. The immediate subordinates of an item are represented by a Group instance. The group of items attached to another item can be accessed by the getSubordinateGroup method of the latter. getMasterGroup gets the group in which an object is subordinate.
Every item can cast a shadow, whose offset from the object is specified by the setShadowOffsetX and setShadowOffsetY methods. The shadow is painted using the brush specified via setShadowBrush.
An application can associate custom data with an item by means of the getTag and setTag methods. The tags are only meant to hold data related to the entities represented by the chart items. They are not used or modified by DroidDiagram in any way. The tags are saved and loaded together with the diagram elements when serializing the document to a disk file or a stream.
Items can be locked for interactive modification by the setLocked method. Locked items can still be modified programmatically. Items can also be marked as locked for automatic layout methods by the setIgnoreLayout method.
java.lang.Object
com.mindfusion.diagramming.DiagramItem
com.mindfusion.diagramming.DiagramLink
com.mindfusion.diagramming.DiagramNode
com.mindfusion.diagramming.Selection