candy.util.whiteboard
Class Rectangle

java.lang.Object
  |
  +--candy.core.candyObject
        |
        +--candy.util.whiteboard.WBPrimitive
              |
              +--candy.util.whiteboard.Rectangle
All Implemented Interfaces:
net.jini.core.entry.Entry, java.io.Serializable
Direct Known Subclasses:
Circle

public class Rectangle
extends WBPrimitive

An Rectangle drawable on the whiteboard

See Also:
Serialized Form

Fields inherited from class candy.util.whiteboard.WBPrimitive
begin, color, deleteFlag, end, myClassName, MyShape, myWB
 
Fields inherited from class candy.core.candyObject
description, handle, timestamp
 
Constructor Summary
Rectangle(java.awt.geom.Point2D.Double[] p, java.awt.Color c, java.lang.String wb)
           
Rectangle(java.awt.geom.Point2D.Double p1, java.awt.geom.Point2D.Double p2, java.awt.Color c, java.lang.String wb)
          Constructor that creates a rectangle of the given dimensions
 
Method Summary
 java.awt.Shape drawNew()
          Every WBPrimitive must be able to draw itself.
 
Methods inherited from class candy.util.whiteboard.WBPrimitive
create, deleted, doAction, draw, finalSequence, getClassName, getColor, getComponent, getWBHandle, postSequence, preSequence, setClassName, setClient
 
Methods inherited from class candy.core.candyObject
getDescription, getHandle, setDescription, setHandle
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rectangle

public Rectangle(java.awt.geom.Point2D.Double p1,
                 java.awt.geom.Point2D.Double p2,
                 java.awt.Color c,
                 java.lang.String wb)
Constructor that creates a rectangle of the given dimensions
Parameters:
_x - is the X coordinate of the upper left corner
_y - is the Y coordinate of the upper left corner
_width - is the width of the rectangle
_height - is the height of the rectangle

Rectangle

public Rectangle(java.awt.geom.Point2D.Double[] p,
                 java.awt.Color c,
                 java.lang.String wb)
Method Detail

drawNew

public java.awt.Shape drawNew()
Description copied from class: WBPrimitive
Every WBPrimitive must be able to draw itself.
Overrides:
drawNew in class WBPrimitive