wheelsunh.users
Class RoundedRectangle
java.lang.Object
wheelsunh.etc.AbstractGraphic
wheelsunh.users.AbstractShape
wheelsunh.users.Shape
wheelsunh.users.RectangularShape
wheelsunh.users.RoundedRectangle
- All Implemented Interfaces:
- AdvancedColorable, Colorable, CustomGraphic, Locatable, Rotatable, Sizeable
- Direct Known Subclasses:
- ConversationBubble
public class RoundedRectangle
- extends RectangularShape
Subclass of RectangularShape that draws a rectangle with rounded corners.
Constructor Summary |
RoundedRectangle()
Creates a shape with dimensions DEFAULT_WIDTH x DEFAULT_HEIGHT
and color DEFAULT_COLOR, located in the center of the
wheelsunh.users.Frame's DrawingPanel. |
RoundedRectangle(java.awt.Color c)
Creates a shape with default dimension and location in the
wheelsunh.users.Frame's DrawingPanel, but with the specified color. |
RoundedRectangle(DrawingPanel dp)
Creates a shape in the passed-in drawing panel. |
RoundedRectangle(int degrees)
Creates a shape with default location, dimension, and color in the
wheelsunh.users.Frame's DrawingPanel, but at rotation degrees |
RoundedRectangle(int x,
int y)
Creates a shape with default dimension and color in the
wheelsunh.users.Frame's DrawingPanel, but at location (x, y). |
Method Summary |
void |
setSize(java.awt.Dimension d)
Sets the shape's size. |
Methods inherited from class wheelsunh.users.RectangularShape |
actualPaint, getBounds, getFillColor, getFrameColor, getFrameThickness, getHeight, getLocation, getSize, getWidth, getXLocation, getYLocation, setColor, setFillColor, setFrameColor, setFrameThickness, setLocation, setLocation, setSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoundedRectangle
public RoundedRectangle()
- Creates a shape with dimensions DEFAULT_WIDTH x DEFAULT_HEIGHT
and color DEFAULT_COLOR, located in the center of the
wheelsunh.users.Frame's DrawingPanel.
RoundedRectangle
public RoundedRectangle(java.awt.Color c)
- Creates a shape with default dimension and location in the
wheelsunh.users.Frame's DrawingPanel, but with the specified color.
RoundedRectangle
public RoundedRectangle(int x,
int y)
- Creates a shape with default dimension and color in the
wheelsunh.users.Frame's DrawingPanel, but at location (x, y).
RoundedRectangle
public RoundedRectangle(int degrees)
- Creates a shape with default location, dimension, and color in the
wheelsunh.users.Frame's DrawingPanel, but at rotation
degrees
RoundedRectangle
public RoundedRectangle(DrawingPanel dp)
- Creates a shape in the passed-in drawing panel. In this constructor,
dimension is 0x0, location (0, 0), and the color is the same as the
DrawingPanel's by default.
setSize
public void setSize(java.awt.Dimension d)
- Sets the shape's size. Overridden to take the RoundedRectangle's
round corners. Since
setSize(int, int)
forwards to
setSize(java.awt.Dimension)
, both methods will work
properly.
- Specified by:
setSize
in interface Sizeable
- Overrides:
setSize
in class RectangularShape