DroidDiagram Programmer's Guide
ShapeNode Class
Remarks See Also
 






ShapeNode objects represent nodes in graphs, tree, process diagrams, and so on.

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

 Syntax

Java  Copy Code

public class ShapeNode extends DiagramNode implements RenderTextCallback, InplaceEditable

 Remarks

Use the setShape method to specify the shape of a node. There are many predefined shapes provided by the Shape class, which also lets you define your custom shapes.

ShapeNodes can be rotated, either interactively using the rotation handle above a node, or programmatically using the setRotationAngle method.

Nodes can display images and text. Use the setImage method to specify an image that should be painted inside a node. The position and alignment of an image within the node are set by the setImageAlign method. To make a node as big as its image, call resizeToFitImage.

To set the node's text, call setText. The text attributes can be changed through the setTextColor and setTextFormat methods. To get even richer text formatting, call setEnableStyledText to true and embed HTML-like formatting tags in the raw text. To make a node big enough to display its text without clipping, call resizeToFitText.

Call setTransparent to make a shape node transparent, so that only its text and image will be drawn.

 Inheritance Hierarchy

java.lang.Object
    com.mindfusion.diagramming.DiagramItem
        com.mindfusion.diagramming.DiagramNode
            com.mindfusion.diagramming.ShapeNode

 See Also

ShapeNode Members
com.mindfusion.diagramming Namespace