Package doodlepad
Class RoundRect
java.lang.Object
doodlepad.Shape
doodlepad.RoundRect
A class that implements a graphical rectangle object with rounded corners
-
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
ConstructorDescriptionDefault constructor for the RoundRect object.RoundRect
(double x, double y, double width, double height, double arcWidth, double arcHeight) Constructor for the RoundRect object, a rounded rectangle.RoundRect
(double x, double y, double width, double height, double arcWidth, double arcHeight, Layer layer) Constructor for the RoundRect object, a rounded rectangle. -
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
-
RoundRect
public RoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight) Constructor for the RoundRect object, a rounded rectangle.- Parameters:
x
- The x-coordinate of the upper left corner of the RoundRect object.y
- The y-coordinate of the upper left corner of the RoundRect object.width
- The width of the RoundRect object.height
- The height of the RoundRect object.arcWidth
- The width of the arc that forms a corner of the RoundRect object.arcHeight
- The height of the arc that forms a corner of the RoundRect object.
-
RoundRect
public RoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight, Layer layer) Constructor for the RoundRect object, a rounded rectangle.- Parameters:
x
- The x-coordinate of the upper left corner of the RoundRect object.y
- The y-coordinate of the upper left corner of the RoundRect object.width
- The width of the RoundRect object.height
- The height of the RoundRect object.arcWidth
- The width of the arc that forms a corner of the RoundRect object.arcHeight
- The height of the arc that forms a corner of the RoundRect object.layer
- The Layer object to which the Image should be added, or null if not to add to a Layer.
-
RoundRect
public RoundRect()Default constructor for the RoundRect object. Creates a new 100x100 draggable shape and positions it randomly.
-
-
Method Details
-
toString
Generate a representation of the RoundRect object. -
draw
Draw the Rounded Rectangle -
getArea
Get the Area object associated with this round rectangle.
-