Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt.geom

Class RoundRectangle2D

java.lang.Object
|
+--java.awt.geom.RectangularShape
   |
   +--java.awt.geom.RoundRectangle2D


public abstract class RoundRectangle2D

extends RectangularShape

This class implements a rectangle with rounded corners.

Author:

Constructor Summary

RoundRectangle2D()

Create a RoundRectangle2D.

Method Summary

booleancontains(double x, double y)

Return true if this object contains the specified point.
booleancontains(double x, double y, double w, double h)

Return true if this object contains the specified rectangle
doublegetArcHeight()

Return the arc height of this round rectangle.
doublegetArcWidth()

Return the arc width of this round rectangle.
java.awt.geom.PathIteratorgetPathIterator(java.awt.geom.AffineTransform at)

Return a new path iterator which iterates over this rectangle.
booleanintersects(double x, double y, double w, double h)

Return true if the given rectangle intersects this shape.
voidsetFrame(double x, double y, double w, double h)

Set the boundary of this round rectangle.
voidsetRoundRect(double x, double y, double w, double h, double arcWidth, double arcHeight)

Set the values of this round rectangle
voidsetRoundRect(java.awt.geom.RoundRectangle2D rr)

Set the values of this round rectangle to be the same as those of the argument.

Constructor Details

RoundRectangle2D

protected RoundRectangle2D()

Create a RoundRectangle2D. This is protected because this class is abstract and cannot be instantiated.


Method Details

contains

public boolean contains(double x, double y)

Return true if this object contains the specified point.

Parameters:


contains

public boolean contains(double x, double y, double w, double h)

Return true if this object contains the specified rectangle

Parameters:


getArcHeight

public double getArcHeight()

Return the arc height of this round rectangle.


getArcWidth

public double getArcWidth()

Return the arc width of this round rectangle.


getPathIterator

public PathIterator getPathIterator(java.awt.geom.AffineTransform at)

Return a new path iterator which iterates over this rectangle.

Parameters:


intersects

public boolean intersects(double x, double y, double w, double h)

Return true if the given rectangle intersects this shape.

Parameters:


setFrame

public void setFrame(double x, double y, double w, double h)

Set the boundary of this round rectangle.

Parameters:


setRoundRect

public void setRoundRect(double x, double y, double w, double h, double arcWidth, double arcHeight)

Set the values of this round rectangle

Parameters:


setRoundRect

public void setRoundRect(java.awt.geom.RoundRectangle2D rr)

Set the values of this round rectangle to be the same as those of the argument.

Parameters: