Hi all, I've just recently started using POI, and so far it seems very intuitive and easy to use. I'm using it to create simple org charts in Powerpoint.
However, one feature I haven't been able to figure out is the creation of connectors between shapes. I've looked through the JavaDoc and searched online, but couldn't find any examples. I know it must be storing this information, because when I create a SlideShow object from an existing .ppt file that already has these connectors, and then save this SlideShow to a new file, the connectors are preserved. Basically what I've got is that I'm creating two rectangle AutoShapes (positions in the org chart) and I want to connect them with a line. AutoShape shape1 = new AutoShape(ShapeTypes.RoundRectangle); shape1.setAnchor(new java.awt.Rectangle(50, 10, 150, 50)); slide.addShape(shape1); AutoShape shape2 = new AutoShape(ShapeTypes.RoundRectangle); shape2.setAnchor(new java.awt.Rectangle(50, 100, 150, 50)); slide.addShape(shape2); I can create another AutoShape that is of type ShapeTypes.BentConnector3, which is what I want to use to connect them, but I can find no way to attach this connector to my other two AutoShapes. Can anyone point me to the class/method I should be looking at for this? Or give some example code for creating this type of connection? Thanks! -Kate Image of the connector I want: http://old.nabble.com/file/p29166431/Capture.png -- View this message in context: http://old.nabble.com/Creating-Connectors-in-Powerpoint-tp29166431p29166431.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
