@Override protected void paint(Graphics graphics, IFigure fig, Insets insets, Color[] tl, Color[] br) { graphics.setLineStyle(Graphics.LINE_SOLID); graphics.setXORMode(false); Rectangle rect = getPaintRectangle(fig, insets); int top = rect.y; int left = rect.x; int bottom = rect.bottom() - 1; int right = rect.right() - 1; drawDarkerSide(graphics, br, top, left, bottom, right); drawLighterSide(graphics, tl, top, left, bottom, right); }
/** @see org.eclipse.draw2d.Figure#paintFigure(Graphics) */ protected void paintFigure(Graphics g) { g.setXORMode(true); g.setForegroundColor(ColorConstants.white); g.setBackgroundColor(LogicColorConstants.ghostFillColor); Rectangle r = getBounds().getCopy(); g.fillOval(r); r.height--; r.width--; g.drawOval(r); g.translate(r.getLocation()); // Draw the "V" g.drawLine(3, 4, 5, 9); g.drawLine(5, 9, 7, 4); g.drawLine(5, 8, 5, 9); // Draw the "+" g.drawLine(9, 7, 9, 11); g.drawLine(7, 9, 11, 9); g.drawPoint(9, 9); }