/** Draw the icon */
  protected void drawIcon(Graphics graphics) {
    graphics.pushState();

    graphics.setLineWidthFloat(1);
    graphics.setForegroundColor(isEnabled() ? ColorConstants.black : ColorConstants.gray);

    Point pt = getIconOrigin();

    Path path = new Path(null);

    path.addArc(pt.x, pt.y, 5, 5, 0, 360);
    path.addArc(pt.x + 2, pt.y - 8, 5, 5, 0, 360);
    path.addArc(pt.x + 10, pt.y - 8, 5, 5, 0, 360);
    path.addArc(pt.x + 8, pt.y, 5, 5, 0, 360);

    path.moveTo(pt.x + 3, pt.y);
    path.lineTo(pt.x + 4, pt.y - 3);

    path.moveTo(pt.x + 11, pt.y);
    path.lineTo(pt.x + 12, pt.y - 3);

    path.moveTo(pt.x + 5, pt.y + 2.5f);
    path.lineTo(pt.x + 8, pt.y + 2.5f);

    path.moveTo(pt.x + 7, pt.y - 5.5f);
    path.lineTo(pt.x + 10, pt.y - 5.5f);

    graphics.drawPath(path);
    path.dispose();

    graphics.popState();
  }
Exemplo n.º 2
0
  /** Draw the icon */
  protected void drawIcon(Graphics graphics) {
    graphics.setLineWidth(1);
    graphics.setForegroundColor(ColorConstants.black);
    graphics.setBackgroundColor(ColorConstants.black);

    Point pt = getIconOrigin();

    Path path = new Path(null);

    graphics.setLineWidthFloat(1.2f);
    path.addArc(pt.x, pt.y, 13, 13, 0, 360);

    graphics.drawPath(path);
    path.dispose();

    graphics.fillOval(pt.x + 5, pt.y + 5, 4, 4);

    graphics.setLineWidth(1);

    path = new Path(null);

    path.moveTo(pt.x - 2, pt.y + 6.5f);
    path.lineTo(pt.x + 15, pt.y + 6.5f);

    path.moveTo(pt.x + 6.5f, pt.y - 2);
    path.lineTo(pt.x + 6.5f, pt.y + 15);

    path.moveTo(pt.x + 0.5f, pt.y + 0.5f);
    path.lineTo(pt.x + 12.5f, pt.y + 12.5f);

    path.moveTo(pt.x + 0.5f, pt.y + 12.5f);
    path.lineTo(pt.x + 12.5f, pt.y + 0.5f);

    graphics.drawPath(path);
    path.dispose();
  }