Examples of drawPolyline()


Examples of java.awt.Graphics.drawPolyline()

  @Override
  public void paintIconShaped(InstancePainter painter) {
    Graphics g = painter.getGraphics();
    int[] xp = new int[] { 8, 0, 0, 8 };
    int[] yp = new int[] { 2, 2, 18, 18 };
    g.drawPolyline(xp, yp, 4);
    GraphicsUtil.drawCenteredArc(g, 8, 10, 8, -90, 180);
    g.drawOval(16, 8, 4, 4);
  }

  @Override
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

    } else {
      int x = isInverter ? 0 : 2;
      g.setColor(Color.BLACK);
      int[] xp = new int[] { x + 15, x + 1, x + 1, x + 15 };
      int[] yp = new int[] { 10,     3,     17,    10 };
      g.drawPolyline(xp, yp, 4);
      if (isInverter) g.drawOval(x + 13, 8, 4, 4);
      g.setColor(Value.FALSE_COLOR);
      g.drawLine(x + 8, 14, x + 8, 18);
    }
  }
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

    } else {
      GraphicsUtil.switchToWidth(g, 2);
      int d = isInverter ? 10 : 0;
      int[] xp = new int[] { -d, -19 - d, -19 - d, -d };
      int[] yp = new int[] {  0,  -7,       7,      0 };
      g.drawPolyline(xp, yp, 4);
      // if (isInverter) g.drawOval(-9, -4, 9, 9);
    }
   
    if (rotate != 0.0) {
      ((Graphics2D) g).rotate(-rotate);
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

    GraphicsUtil.switchToWidth(g, 2);
    int[] xp = new int[] { -width / 2, -width + 1, -width + 1, -width / 2 };
    int[] yp = new int[] { -width / 2, -width / 2, width / 2, width / 2 };
    GraphicsUtil.drawCenteredArc(g, -width / 2, 0, width / 2, -90, 180);

    g.drawPolyline(xp, yp, 4);
    if (height > width) {
      g.drawLine(-width + 1, -height / 2, -width + 1, height / 2);
    }
  }
 
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

  @Override
  protected void paintIconShaped(InstancePainter painter) {
    Graphics g = painter.getGraphics();
    int[] xp = new int[] { 10, 2, 2, 10 };
    int[] yp = new int[] { 2, 2, 18, 18 };
    g.drawPolyline(xp, yp, 4);
    GraphicsUtil.drawCenteredArc(g, 10, 10, 8, -90, 180);
  }

  @Override
  protected void paintShape(InstancePainter painter, int width, int height) {
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

      int[] yp = new int[4];
      xp[0] =  -6; yp[0] 0;
      xp[1] = -19; yp[1] = -6;
      xp[2] = -19; yp[2] 6;
      xp[3] =  -6; yp[3] 0;
      g.drawPolyline(xp, yp, 4);
      g.drawOval(-6, -3, 6, 6);
    } else {
      int[] xp = new int[4];
      int[] yp = new int[4];
      xp[0] = -10; yp[0] = 0;
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

      int[] yp = new int[4];
      xp[0] = -10; yp[0] = 0;
      xp[1] = -29; yp[1] = -7;
      xp[2] = -29; yp[2] = 7;
      xp[3] = -10; yp[3] = 0;
      g.drawPolyline(xp, yp, 4);
      g.drawOval(-9, -4, 9, 9);
    }
  }
 
  static void paintXor(InstancePainter painter, int width, int height) {
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

        int[] yp = new int[4];
        xp[0] = 15; yp[0] = 10;
        xp[1] 1; yp[1] 3;
        xp[2] 1; yp[2] = 17;
        xp[3] = 15; yp[3] = 10;
        g.drawPolyline(xp, yp, 4);
        g.drawOval(15, 8, 4, 4);
      }
    }
  }
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

    int[] yp = new int[4];
    xp[0] = 0;   yp[0] 0;
    xp[1] = -19; yp[1] = -7;
    xp[2] = -19; yp[2] 7;
    xp[3] = 0;   yp[3] 0;
    g.drawPolyline(xp, yp, 4);
   
    if (rotate != 0.0) {
      ((Graphics2D) g).rotate(-rotate);
    }
    g.translate(-x, -y);
View Full Code Here

Examples of java.awt.Graphics.drawPolyline()

        g.drawLine(spine0x, spine0y, spine1x, spine1y);
      }
    } else {
      int[] xSpine = { spine0x, spine1x, x0 + parms.getSpine1X() / 4 };
      int[] ySpine = { spine0y, spine1y, y0 + parms.getSpine1Y() / 4 };
      g.drawPolyline(xSpine, ySpine, 3);
    }
  }

  static void drawLabels(ComponentDrawContext context,
      SplitterAttributes attrs, Location origin) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.