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