xConnectorPropSet.setPropertyValue( "EndGluePointIndex",
new Integer( nEndIndex ) );
XGluePointsSupplier xGluePointsSupplier;
XIndexContainer xIndexContainer;
XIdentifierContainer xIdentifierContainer;
GluePoint2 aGluePoint = new GluePoint2();
aGluePoint.IsRelative = false;
aGluePoint.PositionAlignment = Alignment.CENTER;
aGluePoint.Escape = EscapeDirection.SMART;
aGluePoint.IsUserDefined = true;
aGluePoint.Position.X = 0;
aGluePoint.Position.Y = 0;
// create and insert a glue point at shape1
xGluePointsSupplier = (XGluePointsSupplier)
UnoRuntime.queryInterface( XGluePointsSupplier.class, xShape1 );
xIndexContainer = xGluePointsSupplier.getGluePoints();
xIdentifierContainer = (XIdentifierContainer)
UnoRuntime.queryInterface( XIdentifierContainer.class,
xIndexContainer );
int nIndexOfGluePoint1 = xIdentifierContainer.insert( aGluePoint );
// create and insert a glue point at shape2
xGluePointsSupplier = (XGluePointsSupplier)
UnoRuntime.queryInterface( XGluePointsSupplier.class, xShape2 );
xIndexContainer = xGluePointsSupplier.getGluePoints();
xIdentifierContainer = (XIdentifierContainer)
UnoRuntime.queryInterface( XIdentifierContainer.class,
xIndexContainer );
int nIndexOfGluePoint2 = xIdentifierContainer.insert( aGluePoint );
// create and add a connector
XShape xConnector2 = ShapeHelper.createShape( xDrawDoc,
new Point( 0, 0 ),
new Size( 0, 0 ),