Package java.awt.geom

Examples of java.awt.geom.Ellipse2D


     * @param       width the width of the oval to be drawn.
     * @param       height the height of the oval to be drawn.
     * @see         java.awt.Graphics#fillOval
     */
    public void drawOval(int x, int y, int width, int height){
        Ellipse2D oval = new Ellipse2D.Float(x, y, width, height);
        draw(oval);
    }
View Full Code Here


     * @param       width the width of the oval to be filled.
     * @param       height the height of the oval to be filled.
     * @see         java.awt.Graphics#drawOval
     */
    public void fillOval(int x, int y, int width, int height){
        Ellipse2D oval = new Ellipse2D.Float(x, y, width, height);
        fill(oval);
    }
View Full Code Here

        assertNotNull(box);
        checkBounds(17, 1, 7, box);
        box = view.modelToView(4, new Rectangle(0, 0, 1, 1), Position.Bias.Forward);
        assertNotNull(box);
        checkBounds(1, 0, 1, box);
        Ellipse2D ellipse = new Ellipse2D.Float(25, 3, 30, 40);
        box = view.modelToView(4, ellipse, Position.Bias.Forward);
        checkBounds(55, 3, 40, box);
        box = view.modelToView(4, ellipse, Position.Bias.Backward);
        assertNotNull(box);
        checkBounds(55, 3, 40, box);
View Full Code Here

        checkViewToModel(shape, 12, 5);
        checkViewToModel(shape, 15, 5);
        checkViewToModel(shape, 16, 5);
        checkViewToModel(shape, 30, 5);
        checkViewToModel(shape, 46, 5);
        final Ellipse2D floatEllipse = new Ellipse2D.Float(25, 3, 3, 4);
        checkViewToModelWithEllipse(floatEllipse);
        Ellipse2D intEllipse = new Ellipse2D() {
            @Override
            public double getX() {
                return 25;
            }
View Full Code Here

   * @throws IOException if an I/O error occured.
   */
  public void writeObject (final Object o, final ObjectOutputStream out)
          throws IOException
  {
    final Ellipse2D ellipse = (Ellipse2D) o;
    out.writeDouble(ellipse.getX());
    out.writeDouble(ellipse.getY());
    out.writeDouble(ellipse.getWidth());
    out.writeDouble(ellipse.getHeight());
  }
View Full Code Here

   *
   * @return The object.
   */
  public Object createObject()
  {
    final Ellipse2D rect = new Ellipse2D.Float();

    final float w = getFloatParameter("width");
    final float h = getFloatParameter("height");
    final float x = getFloatParameter("x");
    final float y = getFloatParameter("y");
    rect.setFrame(x, y, w, h);

    return rect;
  }
View Full Code Here

    if (!(o instanceof Ellipse2D))
    {
      throw new ObjectFactoryException("The given object is no java.awt.geom.Rectangle2D.");
    }

    final Ellipse2D rect = (Ellipse2D) o;
    final float x = (float) rect.getX();
    final float y = (float) rect.getY();
    final float w = (float) rect.getWidth();
    final float h = (float) rect.getHeight();

    setParameter("x", new Float(x));
    setParameter("y", new Float(y));
    setParameter("width", new Float(w));
    setParameter("height", new Float(h));
View Full Code Here

   * @param height the height of the oval to be drawn.
   * @see java.awt.Graphics#fillOval
   */
  public void drawOval(final int x, final int y, final int width, final int height)
  {
    final Ellipse2D oval = new Ellipse2D.Float((float) x, (float) y, (float) width, (float) height);
    draw(oval);
  }
View Full Code Here

   * @param height the height of the oval to be filled.
   * @see java.awt.Graphics#drawOval
   */
  public void fillOval(final int x, final int y, final int width, final int height)
  {
    final Ellipse2D oval = new Ellipse2D.Float((float) x, (float) y, (float) width, (float) height);
    fill(oval);
  }
View Full Code Here

  /**
   * @see Graphics#fillOval(int, int, int, int)
   */
  public void fillOval(final int x, final int y, final int width, final int height)
  {
    final Ellipse2D oval = new Ellipse2D.Float((float) x, (float) y, (float) width, (float) height);
    fill(oval);
  }
View Full Code Here

TOP

Related Classes of java.awt.geom.Ellipse2D

Copyright © 2018 www.massapicom. 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.