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