Package doodlepad
Class Oval
java.lang.Object
doodlepad.Shape
doodlepad.Oval
A class that implements a graphical oval shape.
-
Nested Class Summary
Nested classes/interfaces inherited from class doodlepad.Shape
Shape.ShapeMouseEventHandler, Shape.ShapeSelectionEventHandler
-
Field Summary
Fields inherited from class doodlepad.Shape
draggable, eventsEnabled, fillColor, filled, font, fontFamily, fontSize, fontStyle, height, layer, selectable, selected, shapeListener, strokeColor, stroked, strokeWidth, text, textFillColor, transform, visible, width, x, y
-
Constructor Summary
-
Method Summary
Methods inherited from class doodlepad.Shape
contains, contains, drawText, getCenter, getDraggable, getEventsEnabled, getFillAlpha, getFillBlue, getFillColor, getFilled, getFillGreen, getFillRed, getFontFamily, getFontSize, getFontStyle, getHeight, getLayer, getLocation, getPad, getPadLocation, getSelectable, getSelected, getSize, getStrokeAlpha, getStrokeBlue, getStrokeColor, getStroked, getStrokeGreen, getStrokeRed, getStrokeWidth, getText, getTransform, getVisible, getWidth, getWindowLocation, getX, getY, intersects, move, onMouseClicked, onMouseDoubleClicked, onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onSelectionChanged, repaint, reset, rotate, rotate, scale, scale, scale, scale, setCenter, setCenter, setDraggable, setEventsEnabled, setFillColor, setFillColor, setFillColor, setFillColor, setFilled, setFontFamily, setFontSize, setFontStyle, setHeight, setLocation, setLocation, setMouseClickedHandler, setMouseDoubleClickedHandler, setMouseDraggedHandler, setMouseEnteredHandler, setMouseExitedHandler, setMouseMovedHandler, setMousePressedHandler, setMouseReleasedHandler, setPadLocation, setSelectable, setSelected, setSelectionChangedHandler, setSize, setSize, setStrokeColor, setStrokeColor, setStrokeColor, setStrokeColor, setStroked, setStrokeWidth, setText, setTextColor, setTextColor, setTextColor, setTextColor, setTransform, setVisible, setWidth, setWindowLocation, setX, setY, toBack, toFront, toWindowCoords, toWindowCoords, translate
-
Constructor Details
-
Oval
public Oval(double x, double y, double width, double height) Constructor for the Oval object.- Parameters:
x
- The x-coordinate of the upper left-hand corner of the Oval object.y
- The y-coordinate of the upper left-hand corner of the Oval object.width
- The width of the Oval object.height
- The height of the Oval object.
-
Oval
Constructor for the Oval object.- Parameters:
x
- The x-coordinate of the upper left-hand corner of the Oval object.y
- The y-coordinate of the upper left-hand corner of the Oval object.width
- The width of the Oval object.height
- The height of the Oval object.pad
- The Pad to which the Oval should be added.
-
Oval
Constructor for the Oval object.- Parameters:
x
- The x-coordinate of the upper left-hand corner of the Oval object.y
- The y-coordinate of the upper left-hand corner of the Oval object.width
- The width of the Oval object.height
- The height of the Oval object.layer
- The Layer object to which the Oval should be added, or null if not to add to a Layer.
-
Oval
public Oval()Default constructor for the Oval object. Creates a new 100x100 draggable shape and positions it randomly.
-
-
Method Details
-
toString
Generate a representation of the Oval object -
draw
Draw the Oval shape -
getArea
Complete the area of the Oval object
-