package de.ugoe.cs.swe.bnftools.ui.views.syntaxdiagram; import org.eclipse.draw2d.ToolbarLayout; public class AlternativeFigure extends SyntaxDiagramFigure { public AlternativeFigure() { super(); ToolbarLayout layout = new ToolbarLayout(); setLayoutManager(layout); setBorder(new LineMarginBorder(10,40,15,40,0)); } public void addSyntaxFigure(SyntaxDiagramFigure f) { PathFigure leftPath = new PathFigure(); leftPath.setTargetDecoration(null); leftPath.setSourceAnchor(this.getLeftAnchor()); leftPath.setTargetAnchor(f.getLeftAnchor()); add(leftPath); PathFigure rightPath = new PathFigure(); // rightPath.setTargetDecoration(null); rightPath.setSourceAnchor(f.getRightAnchor()); rightPath.setTargetAnchor(this.getRightAnchor()); add(rightPath); add(f); } }