Class Ellipse

java.lang.Object
ro.sync.exml.view.graphics.BaseShape
ro.sync.exml.view.graphics.Ellipse
All Implemented Interfaces:
Shape

@API(type=EXTENDABLE, src=PRIVATE) public class Ellipse extends BaseShape
The class describes an ellipse that is defined by a bounding rectangle.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
    The overall height of this ellipse.
    final int
    The overall width of this ellipse.
    final int
    The x coordinate of the upper left corner of this ellipse.
    final int
    The y coordinate of the upper left corner of thise llipse.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Ellipse(int x, int y, int width, int height)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(int x, int y)
    Warning ! This was not implemented !
     
     
    translate(int tx, int ty)
    Translate the shape into another one.

    Methods inherited from class ro.sync.exml.view.graphics.BaseShape

    contains

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • x

      public final int x
      The x coordinate of the upper left corner of this ellipse.
    • y

      public final int y
      The y coordinate of the upper left corner of thise llipse.
    • width

      public final int width
      The overall width of this ellipse.
    • height

      public final int height
      The overall height of this ellipse.
  • Constructor Details

    • Ellipse

      public Ellipse(int x, int y, int width, int height)
      Constructor.
      Parameters:
      x - The bounding rectangle x pos.
      y - The bounding rectangle y pos.
      width - The bounding rectangle width.
      height - The bounding rectangle height.
  • Method Details

    • getBounds

      public Rectangle getBounds()
      Returns:
      The bounds of this shape.
      See Also:
    • contains

      public boolean contains(int x, int y)
      Warning ! This was not implemented !
      Parameters:
      x - The horizontal coordinate.
      y - The vertical coordinate.
      Returns:
      true if the point is inside the shape. false otherwise.
      See Also:
    • translate

      public Shape translate(int tx, int ty)
      Description copied from interface: Shape
      Translate the shape into another one.
      Parameters:
      tx - the distance by which coordinates are translated in the X axis direction
      ty - the distance by which coordinates are translated in the Y axis direction
      Returns:
      The newly translated shape
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: