Objective Views : Chapter 11 Links : Changing Endpoints
Changing Endpoints
Links, like lines, can be assigned special endpoints. By default, a link does not have any endpoints, but it is easy to add them. The link uses the same methods as the line component for setting endpoints: SetSourceEndpoint() and SetTargetEndpoint(). You can create a CODEndpoint object to pass into these methods. An ideal place to pass a CODEndpoint is the EndLink() method in the main controller of your canvas. To pass in CODEndpoint, override the method, create the link object, and then set the endpoints. The <stingray-installdir>\Samples\Views\Showcase sample illustrates this approach. You could even create a CODLinkComponent derivative that always uses certain endpoint types.