Sets the java.awt.Component that should be hosted inside this node.
Namespace: com.mindfusion.diagramming
Package: com.mindfusion.diagramming
Java
![]() |
---|
public void setControl ( |
A ControlNode drawn by the user has its Control initialized to an instance of the DefaultControlType type. You can assign another control to this property at any time.
The example below shows how to create a new ControlNode instance and set its control:
Java
![]() |
---|
ControlNode host = new ControlNode(diagramView); host.setControl(new JTable(3, 3)); host.setMouseInputMode(MouseInputMode.HandledByHostedControl); diagram.getNodes().add(host); |