Sets the java.awt.Component that should be hosted inside this node.
Namespace: com.mindfusion.diagramming
Package: com.mindfusion.diagramming
SyntaxJava
Copy Code
|
|---|
public void setControl ( |
RemarksA 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.
ExampleThe example below shows how to create a new ControlNode instance and set its control:
Java
Copy Code
|
|---|
| ControlNode host = new ControlNode(diagramView); host.setControl(new JTable(3, 3)); host.setMouseInputMode(MouseInputMode.HandledByHostedControl); diagram.getNodes().add(host); |
See Also