|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jdrawing.graphics.GraphicsOperation org.jdrawing.graphics.RectangleOperation org.jdrawing.graphics.AbstractDrawRect
Base class for drawing operations, which outlines the rectangle.
Constructor Summary | |
AbstractDrawRect(int x,
int y,
int width,
int height)
Returns AbstractDrawRect with given rectangle. |
|
AbstractDrawRect(int x,
int y,
int width,
int height,
Style style)
Returns AbstractDrawRect with given rectangle. |
Method Summary | |
boolean |
contains(java.awt.geom.Point2D point)
Tests if the element contains a given point. |
java.awt.Rectangle |
getBounds()
Returns bounding box of the element. |
java.awt.geom.Rectangle2D |
getBounds2D()
Returns high precision bounding box of the element. |
java.awt.Shape |
getShapeOfOperation()
Returns shape of the area updated by this operation. |
boolean |
intersects(java.awt.geom.Rectangle2D rectangle)
Tests if the element intersects with the given rectangle. |
Methods inherited from class org.jdrawing.graphics.RectangleOperation |
equals, getHeight, getWidth, getX, getY, hashCode, setHeight, setRectangle, setWidth, setX, setY |
Methods inherited from class org.jdrawing.graphics.GraphicsOperation |
getPosition, getStyle, paint, paintOperation, setPosition, setStyle |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractDrawRect(int x, int y, int width, int height)
x
- left edge of the rectangley
- top edge of the rectangewidth
- width of the rectangleheight
- height of the rectangepublic AbstractDrawRect(int x, int y, int width, int height, Style style)
x
- left edge of the rectangley
- top edge of the rectanglewidth
- width of the rectangleheight
- height of the rectangleMethod Detail |
public java.awt.Rectangle getBounds()
getBounds
in interface DrawingElement
getBounds
in class GraphicsOperation
public java.awt.geom.Rectangle2D getBounds2D()
getBounds2D
in interface DrawingElement
getBounds2D
in class GraphicsOperation
public boolean intersects(java.awt.geom.Rectangle2D rectangle)
intersects
in interface DrawingElement
intersects
in class GraphicsOperation
rectangle
- rectangle to be checked for intersection
public boolean contains(java.awt.geom.Point2D point)
contains
in interface DrawingElement
contains
in class GraphicsOperation
point
- to be checked
public java.awt.Shape getShapeOfOperation()
getShapeOfOperation
in class GraphicsOperation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |