01: /*
02: * Created on 5 mai 2005
03: *
04: * @author Christelle
05: *
06: */
07: package org.openwfe.gpe.figures;
08:
09: import org.eclipse.draw2d.ColorConstants;
10: import org.eclipse.draw2d.Graphics;
11: import org.eclipse.draw2d.MarginBorder;
12: import org.eclipse.draw2d.geometry.Rectangle;
13: import org.openwfe.gpe.FlowImages;
14:
15: public class OrFigure extends SubgraphFigure {
16:
17: static final MarginBorder MARGIN_BORDER = new MarginBorder(0, 8, 0,
18: 0);
19:
20: /**
21: * @param header
22: * @param footer
23: */
24: public OrFigure() {
25: super (new StartTag(FlowImages.gear),
26: new EndTag(FlowImages.gear));
27: setBorder(MARGIN_BORDER);
28: setOpaque(true);
29: }
30:
31: protected void paintFigure(Graphics graphics) {
32: super .paintFigure(graphics);
33: graphics.setBackgroundColor(ColorConstants.red);
34: Rectangle r = getBounds();
35: graphics.fillRectangle(r.x + 13, r.y + 10, 8, r.height - 18);
36: }
37:
38: }
|