installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, null);
}
@Override
protected IFigure createFigure() {
Figure f = new FreeformLayer() {
@Override
public void setBounds(Rectangle rect) {
int x = bounds.x, y = bounds.y;
boolean resize = (rect.width != bounds.width) || (rect.height != bounds.height), translate = (rect.x != x)
|| (rect.y != y);
if (isVisible() && (resize || translate)) {
erase();
}
if (translate) {
int dx = rect.x - x;
int dy = rect.y - y;
primTranslate(dx, dy);
}
bounds.width = rect.width;
bounds.height = rect.height;
if (resize || translate) {
fireFigureMoved();
fireCoordinateSystemChanged();
repaint();
}
}
};
delegatingLayoutManager = new DelegatingLayoutManager(this);
f.setLayoutManager(delegatingLayoutManager);
f.setOpaque(true);
ConnectionLayer cLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
cLayer.setAntialias(SWT.ON);
FanRouter fanRouter = new FanRouter();
fanRouter.setSeparation(20);