DroidDiagram Programmer's Guide
BehaviorBase.startDraw Method
See Also
 






Invoked when the user begins drawing inside the diagram canvas.

Namespace: com.mindfusion.diagramming
Package: com.mindfusion.diagramming

 Syntax

Java  Copy Code

protected abstract InteractionState startDraw (
    PointF point,
    MotionEvent e
)

 Parameters

point

The pointer position specified in the current MeasureUnit.

e

The original MotionEvent provided by the Android framework.

 Return Value

An instance of the InteractionState class, which specifies whether the user interaction should create or modify an item.

 Remarks

To start creating an item, pass a new instance of a DiagramItem -derived class to the InteractionState constructor and set the constructor's action argument to Action.Create. Do not add the new item to the diagram's Items list nor call factory methods such as createShapeNode to add the new item to the diagram; the item will be added automatically when the user completes drawing it. If creating a link, use the DiagramLink constructor that takes a single DiagramNode argument, specifying the origin node.

To start modifying an item, provide a reference to an existing item as argument of the InteractionState constructor and set the action argument to Action.Modify.

 See Also

BehaviorBase Members
BehaviorBase Class
com.mindfusion.diagramming Namespace