wheelsunh.users
Class RoundedRectangle

java.lang.Object
  extended by wheelsunh.etc.AbstractGraphic
      extended by wheelsunh.users.AbstractShape
          extended by wheelsunh.users.Shape
              extended by wheelsunh.users.RectangularShape
                  extended by 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.


Field Summary
 
Fields inherited from class wheelsunh.users.Shape
_c, _dp, _shape, DEFAULT_COLOR
 
Fields inherited from class wheelsunh.users.AbstractShape
_rot
 
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 wheelsunh.users.Shape
contains, getColor, getRotation, hide, paint, setRotation, show
 
Methods inherited from class wheelsunh.users.AbstractShape
boundsIntersects, center, distance, getCenter, getCenterX, getCenterY, getIntersection, intersects, intersects, setCenter
 
Methods inherited from class wheelsunh.etc.AbstractGraphic
mouseClicked, mouseDragged, mousePressed, mouseReleased
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface wheelsunh.Colorable
getColor
 

Constructor Detail

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.

Method Detail

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