// This sample demonstrates how to attach a node // proportionally to another node using groups // Create a table and a node TableNode master = diagram.getFactory().createTableNode(10, 10, 80, 120); ShapeNode subordinate = diagram.getFactory().createShapeNode(10, 130, 80, 25); // Create a group, using the table as a master Group group = diagram.getFactory().createGroup(master); // Attach the node to the newly created group group.attachProportional(subordinate, 0, 100, 100, 20); |