Examples of fillPolygon()


Examples of java.awt.Graphics2D.fillPolygon()

    gg.setColor(c.getBackground());

    if (!title.equals("")) {
      int[] xs = {0, titleW, titleW + titleHeight, 0};
      int[] ys = {0, 0, titleHeight, titleHeight};
      gg.fillPolygon(xs, ys, 4);
      gg.fillRect(0, titleHeight, width, height);
      gg.setColor(c.getForeground());
      gg.drawString(title, 10, titleHeight - titleDescent);
    } else {
      gg.fillRect(0, 0, width, height);
View Full Code Here

Examples of java.awt.Graphics2D.fillPolygon()

            g2d.drawLine(insets.left, y, insets.left + x, y);
            Polygon polygon = new Polygon();
            polygon.addPoint(insets.left, y - BOX + 1);
            polygon.addPoint(insets.left, y + BOX);
            polygon.addPoint(insets.left + BOX, y);
            g2d.fillPolygon(polygon);
          } else if (horizontal instanceof Trailing) {
            x = child.getX() + child.getWidth();
            g2d.drawLine(width - insets.right, y, x, y);
            Polygon polygon = new Polygon();
            polygon.addPoint(width - insets.right, y - BOX);
View Full Code Here

Examples of java.awt.Graphics2D.fillPolygon()

            g2d.drawLine(width - insets.right, y, x, y);
            Polygon polygon = new Polygon();
            polygon.addPoint(width - insets.right, y - BOX);
            polygon.addPoint(width - insets.right, y + BOX - 1);
            polygon.addPoint(width - BOX - insets.right, y);
            g2d.fillPolygon(polygon);
          } else if (horizontal instanceof Bilateral) {
            x = ((Bilateral) horizontal).getLeading();
            g2d.drawLine(insets.left, y, insets.left + x, y);
            Polygon polygon = new Polygon();
            polygon.addPoint(insets.left, y - BOX + 1);
View Full Code Here

Examples of java.awt.Graphics2D.fillPolygon()

            g2d.drawLine(insets.left, y, insets.left + x, y);
            Polygon polygon = new Polygon();
            polygon.addPoint(insets.left, y - BOX + 1);
            polygon.addPoint(insets.left, y + BOX);
            polygon.addPoint(insets.left + BOX, y);
            g2d.fillPolygon(polygon);
            x = child.getX() + child.getWidth();
            g2d.drawLine(width - insets.right, y, x, y);
            polygon = new Polygon();
            polygon.addPoint(width - insets.right, y - BOX);
            polygon.addPoint(width - insets.right, y + BOX - 1);
View Full Code Here

Examples of java.awt.Graphics2D.fillPolygon()

            g2d.drawLine(width - insets.right, y, x, y);
            polygon = new Polygon();
            polygon.addPoint(width - insets.right, y - BOX);
            polygon.addPoint(width - insets.right, y + BOX - 1);
            polygon.addPoint(width - BOX - insets.right, y);
            g2d.fillPolygon(polygon);
          }
          Alignment vertical = constraints.getVertical();
          x = child.getX() + child.getWidth() / 2;
          if (vertical instanceof Leading) {
            y = ((Leading) vertical).getLeading();
View Full Code Here

Examples of java.awt.Graphics2D.fillPolygon()

            g2d.drawLine(x, insets.top, x, insets.top + y);
            Polygon polygon = new Polygon();
            polygon.addPoint(x - BOX + 1, insets.top);
            polygon.addPoint(x + BOX, insets.top);
            polygon.addPoint(x, BOX + insets.top);
            g2d.fillPolygon(polygon);
          } else if (vertical instanceof Trailing) {
            y = child.getY() + child.getHeight();
            g2d.drawLine(x, height - insets.bottom, x, y);
            Polygon polygon = new Polygon();
            polygon.addPoint(x - BOX, height - insets.bottom);
View Full Code Here

Examples of java.awt.Graphics2D.fillPolygon()

            g2d.drawLine(x, height - insets.bottom, x, y);
            Polygon polygon = new Polygon();
            polygon.addPoint(x - BOX, height - insets.bottom);
            polygon.addPoint(x + BOX - 1, height - insets.bottom);
            polygon.addPoint(x, height - BOX - insets.bottom);
            g2d.fillPolygon(polygon);
          } else if (vertical instanceof Bilateral) {
            y = ((Bilateral) vertical).getLeading();
            g2d.drawLine(x, insets.top, x, y + insets.top);
            Polygon polygon = new Polygon();
            polygon.addPoint(x - BOX + 1, insets.top);
View Full Code Here

Examples of java.awt.Graphics2D.fillPolygon()

            g2d.drawLine(x, insets.top, x, y + insets.top);
            Polygon polygon = new Polygon();
            polygon.addPoint(x - BOX + 1, insets.top);
            polygon.addPoint(x + BOX, insets.top);
            polygon.addPoint(x, BOX + insets.top);
            g2d.fillPolygon(polygon);
            y = child.getY() + child.getHeight();
            g2d.drawLine(x, height - insets.bottom, x, y);
            polygon = new Polygon();
            polygon.addPoint(x - BOX, height - insets.bottom);
            polygon.addPoint(x + BOX - 1, height - insets.bottom);
View Full Code Here

Examples of java.awt.Graphics2D.fillPolygon()

            g2d.drawLine(x, height - insets.bottom, x, y);
            polygon = new Polygon();
            polygon.addPoint(x - BOX, height - insets.bottom);
            polygon.addPoint(x + BOX - 1, height - insets.bottom);
            polygon.addPoint(x, height - BOX - insets.bottom);
            g2d.fillPolygon(polygon);
          }
        }
      }
      g2d.setStroke(old);
      WidgetAdapter containerAdapter = WidgetAdapter.getWidgetAdapter(container);
View Full Code Here

Examples of java.awt.Graphics2D.fillPolygon()

                af.translate(-viewCoordUL.x,-viewCoordUL.y);
                g2d.setTransform(af);
                g2d.setColor(Color.GRAY);
                g2d.scale(scaleFactor, scaleFactor);
//                g2d.transform(af);
                g2d.fillPolygon(borderPoly);
               
                // LEVEL 2
                g2d.setTransform(new AffineTransform());
                g2d.setColor(Color.GRAY);
                g2d.translate(-viewCoordUL.x,-viewCoordUL.y);
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.