sm
Class SMRectangle

java.lang.Object
  extended bysm.SMShape
      extended bysm.SMRectangularShape
          extended bysm.SMRectangle
All Implemented Interfaces:
java.lang.Cloneable, InteractiveObject

public class SMRectangle
extends SMRectangularShape

A rectangle shape for use with an SMCanvas. If filled, the fill paint is used to paint the interior. If outlined, the outline paint and stroke are used to draw the boundary.

Author:
Caroline Appert

Field Summary
 
Fields inherited from class sm.SMShape
cptId
 
Constructor Summary
SMRectangle()
          Builds an empty SMRectangle.
SMRectangle(double x, double y, double w, double h)
          Builds an SMRectangle.
SMRectangle(double x, double y, double w, double h, java.awt.Paint p)
          Builds an SMRectangle.
SMRectangle(double x, double y, double w, double h, java.awt.Paint p, java.awt.Paint o)
          Builds an SMRectangle.
SMRectangle(double x, double y, double w, double h, java.awt.Paint p, java.awt.Paint o, java.awt.Stroke str)
          Builds a SMRectangle.
SMRectangle(double x, double y, double w, double h, java.awt.Paint p, java.awt.Stroke str)
          Builds a SMRectangle.
SMRectangle(double x, double y, double w, double h, java.awt.Stroke str)
          Builds an SMRectangle.
SMRectangle(java.awt.Paint p)
          Builds an empty SMRectangle.
SMRectangle(java.awt.Paint p, java.awt.Paint o)
          Builds an empty SMRectangle.
SMRectangle(java.awt.Paint p, java.awt.Paint o, java.awt.Stroke str)
          Builds a SMRectangle.
SMRectangle(java.awt.Paint p, java.awt.Stroke str)
          Builds a SMRectangle.
SMRectangle(java.awt.geom.Point2D point, double w, double h)
          Builds an SMRectangle.
SMRectangle(java.awt.geom.Point2D point, double w, double h, java.awt.Paint p)
          Builds an SMRectangle.
SMRectangle(java.awt.geom.Point2D point, double w, double h, java.awt.Paint p, java.awt.Paint o)
          Builds an SMRectangle.
SMRectangle(java.awt.geom.Point2D point, double w, double h, java.awt.Paint p, java.awt.Paint o, java.awt.Stroke str)
          Builds a SMRectangle.
SMRectangle(java.awt.geom.Point2D point, double w, double h, java.awt.Paint p, java.awt.Stroke str)
          Builds a SMRectangle.
SMRectangle(java.awt.geom.Point2D point, double w, double h, java.awt.Stroke str)
          Builds an SMRectangle.
SMRectangle(java.awt.Stroke str)
          Builds an empty SMRectangle.
 
Method Summary
 SMShape duplicate()
          Creates a new copy of this shape and returns it.
 
Methods inherited from class sm.SMRectangularShape
setBoundingBox, setBoundingBox, setDiagonal, setDiagonal
 
Methods inherited from class sm.SMShape
above, aboveAll, addChild, addGhost, addTag, addTag, addTag, addTo, asEllipse, asImage, asPolyLine, asRectangle, asRectangularShape, asText, attachSM, below, belowAll, canvasToShape, clone, contains, contains, contains, contains, containsPoint, containsPoint, copyTo, detachSM, equals, getAbsShape, getAbsTransform, getBoundingBox, getCanvas, getCenterX, getCenterY, getChildren, getClip, getFillPaint, getHeight, getHierarchy, getID, getMaxX, getMaxY, getMinX, getMinY, getOutlinePaint, getParent, getReferenceX, getReferenceY, getRotation, getScaleX, getScaleY, getShape, getStroke, getTransform, getTranslateX, getTranslateY, getTransparency, getWidth, hasTag, hasTag, intersects, intersects, isAbove, isAntialiased, isBelow, isDrawable, isEmpty, isFilled, isOnOutline, isOutlined, isPickable, paint, remove, removeChild, removeGhost, removeTag, removeTag, rotateBy, rotateTo, scaleBy, scaleBy, scaleTo, scaleTo, setAntialiased, setClip, setDrawable, setFilled, setFillPaint, setOutlined, setOutlinePaint, setParent, setPickable, setReferencePoint, setShape, setStroke, setTransparency, shapeToCanvas, translateBy, translateTo
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMRectangle

public SMRectangle()
Builds an empty SMRectangle.


SMRectangle

public SMRectangle(java.awt.Paint p,
                   java.awt.Paint o,
                   java.awt.Stroke str)
Builds a SMRectangle.

Parameters:
p - The fill paint style
o - The outline paint style
str - The stroke style

SMRectangle

public SMRectangle(java.awt.Paint p,
                   java.awt.Stroke str)
Builds a SMRectangle.

Parameters:
p - The fill paint style
str - The stroke style

SMRectangle

public SMRectangle(java.awt.geom.Point2D point,
                   double w,
                   double h,
                   java.awt.Paint p,
                   java.awt.Paint o,
                   java.awt.Stroke str)
Builds a SMRectangle.

Parameters:
point - The upper left point of the bounding box
w - The width of the bounding box
h - The height of the bounding box
p - The fill paint style
o - The outline paint style
str - The stroke style

SMRectangle

public SMRectangle(double x,
                   double y,
                   double w,
                   double h,
                   java.awt.Paint p,
                   java.awt.Paint o,
                   java.awt.Stroke str)
Builds a SMRectangle.

Parameters:
x - The x coordinate of the upper left point of the bounding box
y - The y coordinate of the upper left point of the bounding box
w - The width of the bounding box
h - The height of the bounding box
p - The fill paint style
o - The outline paint style
str - The stroke style

SMRectangle

public SMRectangle(java.awt.geom.Point2D point,
                   double w,
                   double h,
                   java.awt.Paint p,
                   java.awt.Stroke str)
Builds a SMRectangle.

Parameters:
point - The upper left point of the bounding box
w - The width of the bounding box
h - The height of the bounding box
p - The fill paint style
str - The stroke style

SMRectangle

public SMRectangle(double x,
                   double y,
                   double w,
                   double h,
                   java.awt.Paint p,
                   java.awt.Stroke str)
Builds a SMRectangle.

Parameters:
x - The x coordinate of the upper left point of the bounding box
y - The y coordinate of the upper left point of the bounding box
w - The width of the bounding box
h - The height of the bounding box
p - The fill paint style
str - The stroke style

SMRectangle

public SMRectangle(java.awt.Paint p,
                   java.awt.Paint o)
Builds an empty SMRectangle.

Parameters:
p - The paint style
o - The outline paint style

SMRectangle

public SMRectangle(java.awt.Paint p)
Builds an empty SMRectangle.

Parameters:
p - The paint style

SMRectangle

public SMRectangle(java.awt.geom.Point2D point,
                   double w,
                   double h,
                   java.awt.Paint p,
                   java.awt.Paint o)
Builds an SMRectangle.

Parameters:
point - The upper left point of the bounding box
w - The width of the bounding box
h - The height of the bounding box
p - The fill paint style
o - The outline paint style

SMRectangle

public SMRectangle(double x,
                   double y,
                   double w,
                   double h,
                   java.awt.Paint p,
                   java.awt.Paint o)
Builds an SMRectangle.

Parameters:
x - The x coordinate of the upper left point of the bounding box
y - The y coordinate of the upper left point of the bounding box
w - The width of the bounding box
h - The height of the bounding box
p - The paint style
o - The outline paint style

SMRectangle

public SMRectangle(java.awt.geom.Point2D point,
                   double w,
                   double h,
                   java.awt.Paint p)
Builds an SMRectangle.

Parameters:
point - The upper left point of the bounding box
w - The width of the bounding box
h - The height of the bounding box
p - The fill paint style

SMRectangle

public SMRectangle(double x,
                   double y,
                   double w,
                   double h,
                   java.awt.Paint p)
Builds an SMRectangle.

Parameters:
x - The x coordinate of the upper left point of the bounding box
y - The y coordinate of the upper left point of the bounding box
w - The width of the bounding box
h - The height of the bounding box
p - The paint style

SMRectangle

public SMRectangle(java.awt.Stroke str)
Builds an empty SMRectangle.

Parameters:
str - The stroke style

SMRectangle

public SMRectangle(java.awt.geom.Point2D point,
                   double w,
                   double h,
                   java.awt.Stroke str)
Builds an SMRectangle.

Parameters:
point - The upper left point of the bounding box
w - The width of the bounding box
h - The height of the bounding box
str - The stroke style

SMRectangle

public SMRectangle(double x,
                   double y,
                   double w,
                   double h,
                   java.awt.Stroke str)
Builds an SMRectangle.

Parameters:
x - The x coordinate of the upper left point of the bounding box
y - The y coordinate of the upper left point of the bounding box
w - The width of the bounding box
h - The height of the bounding box
str - The stroke style

SMRectangle

public SMRectangle(java.awt.geom.Point2D point,
                   double w,
                   double h)
Builds an SMRectangle.

Parameters:
point - The upper left point of the bounding box
w - The width of the bounding box
h - The height of the bounding box

SMRectangle

public SMRectangle(double x,
                   double y,
                   double w,
                   double h)
Builds an SMRectangle.

Parameters:
x - The x coordinate of the upper left point of the bounding box
y - The y coordinate of the upper left point of the bounding box
w - The width of the bounding box
h - The height of the bounding box
Method Detail

duplicate

public SMShape duplicate()
Creates a new copy of this shape and returns it.

Overrides:
duplicate in class SMShape
Returns:
Returns the copy.