// Tell the selection dragger to select connectors too
controller.getSelectionDragger().addSelectionInteractor(ci);
// Create and set up the manipulator for connectors
ConnectorManipulator manipulator = new ConnectorManipulator();
manipulator.setSnapHalo(4.0);
manipulator.setConnectorTarget(new SRTarget());
ci.setPrototypeDecorator(manipulator);
// To illustrate the notification call-backs from the
// manipulator, here is an simple example of a connector
// listener
ConnectorListener cl = new ConnectorListener() {
public void connectorDragged(ConnectorEvent e) {
//// System.out.println("Dragged");
}
public void connectorDropped(ConnectorEvent e) {
System.out.println("Dropped");
}
public void connectorSnapped(ConnectorEvent e) {
System.out.println("Snapped");
}
public void connectorUnsnapped(ConnectorEvent e) {
System.out.println("Unsnapped");
}
};
manipulator.addConnectorListener(cl);
}