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

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

public class RoundRectangle
extends RectangularShape

Round Rectangle Shape.

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

Nested Class Summary
protected static class RoundRectangle.RoundRectanglePathIterator
          Round Rectangle Path Iterator.
 
Constructor Summary
RoundRectangle()
          Constructs new RoundRectangle object.
RoundRectangle(int x, int y, int width, int height, int arcwidth, int archeight)
          Constructs new RoundRectangle 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)
          
 int getArcHeight()
          Returns the arc height.
 int getArcWidth()
          Returns the arc width.
 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

RoundRectangle

public RoundRectangle()
Constructs new RoundRectangle object.


RoundRectangle

public RoundRectangle(int x,
                      int y,
                      int width,
                      int height,
                      int arcwidth,
                      int archeight)
Constructs new RoundRectangle object.

Parameters:
x - the x coordinate of the rectangle
y - the y coordinate of the rectangle
width - the width of the rectangle
height - the height of the rectangle
arcwidth - the arc width
archeight - the arc height
Method Detail

getArcWidth

public int getArcWidth()
Returns the arc width.

Returns:
the arc width

getArcHeight

public int getArcHeight()
Returns the arc height.

Returns:
the arc height

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.