|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jdrawing.TransformingDrawingElementRenderer
This implementation of DrawingElementRenderer
allows user
to apply affine transform to drawing. It actually does not render any
elements but delegates rendering requests to another element renderer.
Constructor Summary | |
TransformingDrawingElementRenderer(java.awt.geom.AffineTransform transform,
DrawingElementRenderer renderer)
Returns a TransformingDrawingElementRenderer
with given transform and renderer. |
Method Summary | |
boolean |
elementContains(java.lang.Object element,
java.awt.geom.Point2D point)
Tests if the given element contains the given point. |
boolean |
elementIntersects(java.lang.Object element,
java.awt.geom.Rectangle2D rectangle)
Tests if the given element intersects with the given rectangle. |
java.awt.Rectangle |
getElementBounds(java.lang.Object element)
Gets the bounding box for the element. |
java.awt.geom.Rectangle2D |
getElementBounds2D(java.lang.Object element)
Return the high precision bounding box of the element. |
DrawingElementRenderer |
getRenderer()
Gets the DrawingElementRenderer which is used by this
renderer to delegate rendering requests to. |
java.awt.geom.AffineTransform |
getTransform()
Gets the AffineTransform used by this transforming renderer. |
void |
paintDrawingElement(java.awt.Graphics graphics,
java.lang.Object element)
Paints the given element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TransformingDrawingElementRenderer(java.awt.geom.AffineTransform transform, DrawingElementRenderer renderer)
TransformingDrawingElementRenderer
with given transform and renderer.
transform
- an AffineTransform
to be applyed
to drawingrenderer
- a DrawingElementRenderer
which
all rendering requests will be delegated toMethod Detail |
public java.awt.geom.AffineTransform getTransform()
AffineTransform
used by this transforming renderer.
public DrawingElementRenderer getRenderer()
DrawingElementRenderer
which is used by this
renderer to delegate rendering requests to.
public void paintDrawingElement(java.awt.Graphics graphics, java.lang.Object element)
paintDrawingElement
in interface DrawingElementRenderer
graphics
- graphics context to use for paintingelement
- element to be paintedpublic java.awt.Rectangle getElementBounds(java.lang.Object element)
getElementBounds
in interface DrawingElementRenderer
element
- element to be queried for bounding box
public java.awt.geom.Rectangle2D getElementBounds2D(java.lang.Object element)
getElementBounds2D
in interface DrawingElementRenderer
element
- element to be queried for bounding box
public boolean elementIntersects(java.lang.Object element, java.awt.geom.Rectangle2D rectangle)
elementIntersects
in interface DrawingElementRenderer
element
- element to be checked for intersectionrectangle
- rectangle to be checked for intersection
public boolean elementContains(java.lang.Object element, java.awt.geom.Point2D point)
elementContains
in interface DrawingElementRenderer
element
- element to be checkedpoint
- point to be checked
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |