// This sample demonstrates how to specify // the orientation of a link's text // Create two nodes and a link connecting them ShapeNode start = diagram.getFactory().createShapeNode(10, 10, 20, 20); ShapeNode end = diagram.getFactory().createShapeNode(160, 140, 20, 20); DiagramLink link = diagram.getFactory().createDiagramLink(start, end); // Set the text and font of the link link.setText("some slanted text"); link.setFont(new Font("Arial", Font.BOLD, 8)); // Set the text orientation link.setTextStyle(LinkTextStyle.Rotate); |