yu.ac.bg.etf.javaqx.qswing.graphics
Class Ellipse

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.qswing.graphics.RectangularShape
      extended byyu.ac.bg.etf.javaqx.qswing.graphics.Ellipse
All Implemented Interfaces:
Shape

public class Ellipse
extends RectangularShape

Ellipse Shape.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Nested Class Summary
protected static class Ellipse.EllipsePathIterator
          Ellipse Path Iterator.
 
Constructor Summary
Ellipse()
          Constructs new Ellipse object.
Ellipse(int x, int y, int width, int height)
          Constructs new Ellipse object.
 
Method Summary
 boolean contains(int x, int y)
          Returns true if the specified coordinates lie in the shape.
 boolean equals(java.lang.Object obj)
          
 Rectangle getBounds()
          Returns a rectangle that completely encloses the shape.
 int getHeight()
          Returns the height of the framing rectangle.
 PathIterator getPathIterator()
          Returns path iterator that traverses the geometry of the Shape.
 int getWidth()
          Returns the width of the framing rectangle.
 int getX()
          Returns the x coordinate of the framing rectangle.
 int getY()
          Returns the y coordinate of the framing rectangle.
 int hashCode()
          
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Ellipse

public Ellipse()
Constructs new Ellipse object.


Ellipse

public Ellipse(int x,
               int y,
               int width,
               int height)
Constructs new Ellipse object.

Parameters:
x - the x coordinate of the ellipse
y - the y coordinate of the ellipse
width - the width of the ellipse
height - the height of the ellipse
Method Detail

contains

public boolean contains(int x,
                        int y)
Returns true if the specified coordinates lie in the shape.

Parameters:
x - the x coordinate
y - the y coordinate
Returns:
true if the specified coordinates lie in the shape

getBounds

public Rectangle getBounds()
Returns a rectangle that completely encloses the shape.

Specified by:
getBounds in interface Shape
Overrides:
getBounds in class RectangularShape

getPathIterator

public PathIterator getPathIterator()
Returns path iterator that traverses the geometry of the Shape.

Returns:
path iterator that traverses the geometry of the Shape

equals

public boolean equals(java.lang.Object obj)


hashCode

public int hashCode()


toString

public java.lang.String toString()


getX

public int getX()
Returns the x coordinate of the framing rectangle.

Specified by:
getX in class RectangularShape
Returns:
the x coordinate of the framing rectangle

getY

public int getY()
Returns the y coordinate of the framing rectangle.

Specified by:
getY in class RectangularShape
Returns:
the y coordinate of the framing rectangle

getWidth

public int getWidth()
Returns the width of the framing rectangle.

Specified by:
getWidth in class RectangularShape
Returns:
the width of the framing rectangle

getHeight

public int getHeight()
Returns the height of the framing rectangle.

Specified by:
getHeight in class RectangularShape
Returns:
the height of the framing rectangle


Copyright © 2007 ETF and contributors. All Rights Reserved.