Package java.awt

Examples of java.awt.Polygon.addPoint()


            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);
            polygon.addPoint(x, height - BOX - insets.bottom);
            g2d.fillPolygon(polygon);
          }
        }
View Full Code Here


            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);
            polygon.addPoint(x, height - BOX - insets.bottom);
            g2d.fillPolygon(polygon);
          }
        }
      }
View Full Code Here

            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);
            polygon.addPoint(x, height - BOX - insets.bottom);
            g2d.fillPolygon(polygon);
          }
        }
      }
      g2d.setStroke(old);
View Full Code Here

      Point bottomRight = new Point(ARROW_WIDTH, 0);
     
      //This polygon is drawn on the left, but then gets rotated
      //so it actually appears on the right if North is up.
      Polygon left = new Polygon();
      left.addPoint(centerBase.x, centerBase.y);
      left.addPoint(tip.x, tip.y);
      left.addPoint(bottomLeft.x, bottomLeft.y);      
      g.setColor( Color.black );
      g.fill(left);
      g.draw(left);
View Full Code Here

      //This polygon is drawn on the left, but then gets rotated
      //so it actually appears on the right if North is up.
      Polygon left = new Polygon();
      left.addPoint(centerBase.x, centerBase.y);
      left.addPoint(tip.x, tip.y);
      left.addPoint(bottomLeft.x, bottomLeft.y);      
      g.setColor( Color.black );
      g.fill(left);
      g.draw(left);
     
      Polygon right = new Polygon();
View Full Code Here

      g.setColor( Color.black );
      g.fill(left);
      g.draw(left);
     
      Polygon right = new Polygon();
      right.addPoint(centerBase.x, centerBase.y);
      right.addPoint(tip.x, tip.y);
      right.addPoint(bottomRight.x, bottomRight.y);
      g.setColor( Color.white );
      g.fill(right);
      g.setColor( Color.black );
View Full Code Here

      g.fill(left);
      g.draw(left);
     
      Polygon right = new Polygon();
      right.addPoint(centerBase.x, centerBase.y);
      right.addPoint(tip.x, tip.y);
      right.addPoint(bottomRight.x, bottomRight.y);
      g.setColor( Color.white );
      g.fill(right);
      g.setColor( Color.black );
      g.draw(right);
View Full Code Here

      g.draw(left);
     
      Polygon right = new Polygon();
      right.addPoint(centerBase.x, centerBase.y);
      right.addPoint(tip.x, tip.y);
      right.addPoint(bottomRight.x, bottomRight.y);
      g.setColor( Color.white );
      g.fill(right);
      g.setColor( Color.black );
      g.draw(right);
View Full Code Here

   * @return A test polygon.
   */
  private Polygon createTestPolygon1()
  {
    Polygon p = new Polygon();
    p.addPoint(0, 0);
    p.addPoint(1, 2);
    p.addPoint(2, 0);
    return p;
  }

View Full Code Here

   */
  private Polygon createTestPolygon1()
  {
    Polygon p = new Polygon();
    p.addPoint(0, 0);
    p.addPoint(1, 2);
    p.addPoint(2, 0);
    return p;
  }

  /**
 
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.