Last change
on this file since 23 was
5,
checked in by zeiss, 14 years ago
|
|
-
Property svn:mime-type set to
text/plain
|
File size:
841 bytes
|
Rev | Line | |
---|
[5] | 1 | package de.ugoe.cs.swe.bnftools.ui.views.syntaxdiagram;
|
---|
| 2 |
|
---|
| 3 | import org.eclipse.draw2d.ToolbarLayout;
|
---|
| 4 |
|
---|
| 5 | public class AlternativeFigure extends SyntaxDiagramFigure {
|
---|
| 6 |
|
---|
| 7 | public AlternativeFigure() {
|
---|
| 8 | super();
|
---|
| 9 |
|
---|
| 10 | ToolbarLayout layout = new ToolbarLayout();
|
---|
| 11 | setLayoutManager(layout);
|
---|
| 12 |
|
---|
| 13 | setBorder(new LineMarginBorder(10,40,15,40,0));
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | public void addSyntaxFigure(SyntaxDiagramFigure f) {
|
---|
| 17 |
|
---|
| 18 | PathFigure leftPath = new PathFigure();
|
---|
| 19 | leftPath.setTargetDecoration(null);
|
---|
| 20 | leftPath.setSourceAnchor(this.getLeftAnchor());
|
---|
| 21 | leftPath.setTargetAnchor(f.getLeftAnchor());
|
---|
| 22 | add(leftPath);
|
---|
| 23 |
|
---|
| 24 | PathFigure rightPath = new PathFigure();
|
---|
| 25 | // rightPath.setTargetDecoration(null);
|
---|
| 26 | rightPath.setSourceAnchor(f.getRightAnchor());
|
---|
| 27 | rightPath.setTargetAnchor(this.getRightAnchor());
|
---|
| 28 | add(rightPath);
|
---|
| 29 |
|
---|
| 30 | add(f);
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.