for (String id: edges) {
ConnectionWidget cw = (ConnectionWidget) scene.findWidget(id);
boolean isSourceIn;
boolean isTargetIn;
LabelWidget source = (LabelWidget) scene.findWidget(scene
.getEdgeSource(id));
Rectangle rect = source.getPreferredBounds();
Point location = source.getPreferredLocation();
Point pa = new Point(location.x + rect.x, location.y + rect.y);
Point pb = new Point(location.x + rect.x + rect.width,
location.y + rect.y + rect.height);
isSourceIn = isInSelectedArea(pa) && isInSelectedArea(pb);
LabelWidget target = (LabelWidget) scene.findWidget(scene
.getEdgeTarget(id));
rect = target.getPreferredBounds();
location = target.getPreferredLocation();
pa = new Point(location.x + rect.x, location.y + rect.y);
pb = new Point(location.x + rect.x + rect.width, location.y
+ rect.y + rect.height);
isTargetIn = isInSelectedArea(pa) && isInSelectedArea(pb);