// This sample demonstrates how to connect tables programmatically // and how to customize links' arrowheads // Create two related tables TableNode t1 = diagram.getFactory().createTableNode(10, 10, 40, 50); TableNode t2 = diagram.getFactory().createTableNode(80, 10, 40, 50); // Setup tables t1.redimTable(1, 2); t2.redimTable(1, 2); // Create a link which connects the tables DiagramLink link = diagram.getFactory().createDiagramLink(t1, 0, t2, 1); // Set the link's style to cascading link.setSegmentCount(3); link.setStyle(LinkStyle.Cascading); link.setCascadeOrientation(Orientation.Horizontal); // Set the link's arrowhead shapes link.setHeadShape(ArrowHeads.RevTriangle); link.setHeadShapeSize(3); link.setBaseShape(ArrowHeads.Tetragon); link.setBaseShapeSize(5); |