org.jdrawing.graphics
Class DrawRect
java.lang.Object
org.jdrawing.graphics.GraphicsOperation
org.jdrawing.graphics.RectangleOperation
org.jdrawing.graphics.AbstractDrawRect
org.jdrawing.graphics.DrawRect
- All Implemented Interfaces:
- DrawingElement
- public class DrawRect
- extends AbstractDrawRect
Graphics element which corresponds to Graphics.drawRect(int, int, int, int)
Constructor Summary |
DrawRect(int x,
int y,
int width,
int height)
Returns DrawRect with given rectangle. |
DrawRect(int x,
int y,
int width,
int height,
Style style)
Returns DrawRect with given rectangle. |
Method Summary |
void |
paintOperation(java.awt.Graphics2D graphics)
Performs drawing operation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DrawRect
public DrawRect(int x,
int y,
int width,
int height)
- Returns DrawRect with given rectangle.
- Parameters:
x
- left edge of the rectangley
- top edge of the rectanglewidth
- width of the rectangleheight
- height of the rectangle
DrawRect
public DrawRect(int x,
int y,
int width,
int height,
Style style)
- Returns DrawRect with given rectangle.
- Parameters:
x
- left edge of the rectangley
- top edge of the rectanglewidth
- width of the rectangleheight
- height of the rectangle
paintOperation
public void paintOperation(java.awt.Graphics2D graphics)
- Performs drawing operation. This implementation invokes
graphics.drawRect ()
.
- Specified by:
paintOperation
in class GraphicsOperation
- Parameters:
graphics
- graphics context to use for painting