O'Reilly logo

The Eclipse Graphical Editing Framework (GEF) by Eric Clayberg, Jaime Wren, Dan Rubel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Connections

Connections are specialized figures that implement the Connection interface and draw a line between two locations on the canvas, typically “connecting” two figures. You could create your own implementation of the Connection interface, but most developers use the PolylineConnection class provided by Draw2D. Since many diagrams use connections to indicate direction, connections have a beginning, called the source, and an end, called the target. Both the source and the target must have their own anchor, which is responsible for calculating the location where the connection starts and ends respectively. Typically, an anchor is associated with an owner figure, but anchors can be fixed to a point on the canvas instead.

In the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required