|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.byu.phun2d.DrawObj edu.byu.phun2d.Oval
public class Oval
This class draws an oval based on a center point and a width and height. This will only create ovals that are aligned with the X and Y axes. Other kinds of ovals can be created by adding it to a Group and then performing scales and rotations through the Group.
Constructor Summary | |
---|---|
Oval(double centerX,
double centerY,
double width,
double height)
This creates a new oval object with the specified location and size. |
Method Summary | |
---|---|
double |
getCenterX()
The X coordinate of the center of the oval. |
double |
getCenterY()
The Y coordinate of the center of the oval. |
double |
getHeight()
The height of the oval. |
double |
getWidth()
The width of the oval. |
void |
setCenter(double centerX,
double centerY)
Changes the center coordinates of the oval. |
void |
setHeight(double newHeight)
Changes the height of the oval. |
void |
setWidth(double newWidth)
Changes the width of the oval. |
Methods inherited from class edu.byu.phun2d.DrawObj |
---|
getFillColor, getLineColor, getLineWidth, getRotate, getScaleX, getScaleY, getTranslate, insideToOutside, outsideToInside, setFillColor, setLineColor, setLineWidth, setRotate, setScale, setTranslate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Oval(double centerX, double centerY, double width, double height)
centerX
- this is the X coordinate of the center of the OvalcenterY
- this is the Y coordinate of the center of the Ovalwidth
- this is the width of the new Ovalheight
- this is the height of the OvalMethod Detail |
---|
public void setCenter(double centerX, double centerY)
centerX
- the new X coordinate.centerY
- the new Y coordinate.public void setWidth(double newWidth)
newWidth
- the new width.public void setHeight(double newHeight)
newHeight
- the new height.public double getWidth()
public double getHeight()
public double getCenterX()
public double getCenterY()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |