Package doodlepad
Class Rectangle
java.lang.Object
doodlepad.Shape
doodlepad.Rectangle
A class that implements a graphical rectangle object
-
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
Modifier and TypeMethodDescriptionvoid
draw
(Graphics2D g) Draw the RectangletoString()
Generate a representation of the Rectangle objectMethods inherited from class doodlepad.Shape
contains, contains, drawText, getArea, 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
-
Rectangle
public Rectangle(double x, double y, double width, double height) Constructor for the Rectangle object.- Parameters:
x
- The x-coordinate of the upper left-hand corner of the Rectangle object.y
- The y-coordinate of the upper left-hand corner of the Rectangle object.width
- The width of the Rectangle object.height
- The height of the Rectangle object.
-
Rectangle
Constructor for the Rectangle object.- Parameters:
x
- The x-coordinate of the upper left-hand corner of the Rectangle object.y
- The y-coordinate of the upper left-hand corner of the Rectangle object.width
- The width of the Rectangle object.height
- The height of the Rectangle object.layer
- The Layer object to which the Oval should be added, or null if not to add to a Layer.
-
Rectangle
public Rectangle()Default constructor for the Rectangle object. Creates a new 100x100 draggable shape and positions it randomly.
-
-
Method Details