MindFusion.Java Package Programmer's Guide
ControlNode Class
Remarks See Also
 






ControlNode is an adapter class that enables using any java.awt.Component -derived object as a diagram node.

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

 Syntax

Java  Copy Code

public class ControlNode extends DiagramNode

 Remarks

A ControlNode object might be used to implement advanced entity viewers or editors. An instance of any java.awt.Component -derived class can be assigned to the Control property of the host node. That might be a standard Java Swing component such as a JTable or your own custom control.

If the Behavior property of DiagramView is set to DrawControls or LinkControls, then users are allowed to draw control host nodes interactively. Such host nodes will have their Control initialized to an instance of the type specified via DefaultControlType.

If a user presses the mouse button while the mouse pointer is over a hosted control, JDiagram will either pass the mouse event to the control, or will try to intercept it in order to start moving or resizing the host node. That depends on the value of the MouseInputMode property.

When serializing a diagram to XML, JDiagram uses the Java introspection API to get or set the simple attributes of hosted controls. It also raises the serializeControl and deserializeControl events to let you save the content of hosted nodes using custom code, in case the built-in serialization mechanism is not sufficient.

 Inheritance Hierarchy

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

 See Also

ControlNode Members
com.mindfusion.diagramming Namespace