public EdgeFigure() { tooltipFigure = new TooltipFigure(); setToolTip(tooltipFigure); this.setLineWidth(this.getLineWidth() * 2); this.setTargetDecoration(new PolylineDecoration()); label = new Label("e_"+ID.getId()); label.setOpaque(true); label.setBackgroundColor(ColorConstants.buttonLightest); label.setBorder(new LineBorder()); add(label, new MidpointLocator(this, 0)); guardedFigure = new GuardFigure(); blockedFigure = new BlockedFigure(); actionFigure = new ActionFigure (); add (actionFigure, new RelativeLocator(label,0.5,1.5)); }
public PreferredSizeSquareHandle(GraphicalEditPart editpart) { super(editpart, new RelativeLocator(getHostFigure(), 0.75, 1) { protected Rectangle getReferenceBox() { IFigure f = getReferenceFigure(); if (f instanceof HandleBounds) return ((HandleBounds) f).getHandleBounds(); return super.getReferenceBox(); } }); }