public class BasicRectangle extends BasicFigure
Constructor and Description |
---|
BasicRectangle(double x,
double y,
double width,
double height)
Create a new rectangle with the given origin and size, a
unit-width continuous stroke and no paint pattern.
|
BasicRectangle(double x,
double y,
double width,
double height,
float lineWidth)
Create a new rectangle with the given origin, size, and
outline width.
|
BasicRectangle(double x,
double y,
double width,
double height,
java.awt.Paint fill)
Create a new rectangle with the given origin, size, and
fill paint.
|
BasicRectangle(double x,
double y,
double width,
double height,
java.awt.Paint fill,
float lineWidth)
Create a new rectangle with the given origin, size, fill, and
outline width.
|
BasicRectangle(java.awt.geom.Rectangle2D rect)
Create a new rectangle with the given rectangle shape, a
unit-width continuous stroke and no paint pattern.
|
BasicRectangle(java.awt.geom.Rectangle2D bounds,
java.awt.Paint fill)
Create a new rectangle with the given bounds and
fill paint.
|
Modifier and Type | Method and Description |
---|---|
void |
translate(double x,
double y)
Translate the rectangle the given distance
|
getBounds, getComposite, getDashArray, getFillPaint, getLineWidth, getOrigin, getRotation, getShape, getStrokePaint, hit, isCentered, paint, setCentered, setComposite, setDashArray, setFillPaint, setLineWidth, setPrototypeShape, setRotation, setShape, setStroke, setStrokePaint, transform
contains, getInteractor, getLayer, getParent, getToolTipText, getTransformContext, getUserObject, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
contains, getInteractor, getLayer, getParent, getToolTipText, intersects, setInteractor, setParent, setToolTipText
isVisible, paint, setVisible
getTransformContext, repaint, repaint
getUserObject, setUserObject
public BasicRectangle(java.awt.geom.Rectangle2D rect)
public BasicRectangle(double x, double y, double width, double height)
public BasicRectangle(double x, double y, double width, double height, java.awt.Paint fill)
public BasicRectangle(java.awt.geom.Rectangle2D bounds, java.awt.Paint fill)
public BasicRectangle(double x, double y, double width, double height, float lineWidth)
public BasicRectangle(double x, double y, double width, double height, java.awt.Paint fill, float lineWidth)
public void translate(double x, double y)
translate
in interface Figure
translate
in class AbstractFigure
x
- The x value to be moved.y
- The y value to be moved.