package de.ugoe.cs.swe.bnftools.ui.views.syntaxdiagram; import org.eclipse.draw2d.ToolbarLayout; public class OptionRepetitionFigure extends SyntaxDiagramFigure { public OptionRepetitionFigure(SyntaxDiagramFigure f) { super(); setLayoutManager(new ToolbarLayout()); RepetitionFigure repetition = new RepetitionFigure(f); OptionFigure optional = new OptionFigure(repetition); add(optional); PathFigure leftConnectionPath = new PathFigure(); leftConnectionPath.setSourceAnchor(this.getLeftAnchor()); leftConnectionPath.setTargetAnchor(optional.getLeftAnchor()); add(leftConnectionPath); PathFigure rightConnectionPath = new PathFigure(); rightConnectionPath.setSourceAnchor(optional.getRightAnchor()); rightConnectionPath.setTargetAnchor(this.getRightAnchor()); add(rightConnectionPath); setBorder(new LineMarginBorder(10, 40, 10, 40, 0)); } }