public class AnnotationGraphicsRenderer extends AbstractRenderer
Graphics2D
.graphicsContextRenderer
Constructor and Description |
---|
AnnotationGraphicsRenderer(Annotation annotation)
Constructs a new instance which will render the given annotation.
|
Modifier and Type | Method and Description |
---|---|
Annotation |
getAnnotation()
Returns the annotation to be rendered.
|
Rectangle |
getTargetBounds()
Returns the target rectangle into which the entired annotation will be fitted.
|
void |
render(Graphics2D target)
Renders an
Annotation into the given Graphics2D . |
void |
setTargetBounds(Rectangle targetBounds)
Sets the target rectangle into which the entired annotation will be fitted.
|
getRenderControls, setRenderControls
public AnnotationGraphicsRenderer(Annotation annotation)
IllegalArgumentException
- if the given annotation is null
public Annotation getAnnotation()
Annotation
public Rectangle getTargetBounds()
The target bounds can be defined with a call of setTargetBounds(Rectangle)
. If no
target bounds are defined the bounds of the annotation will be used.
setTargetBounds(Rectangle)
prior to the call of this method, this bounds will
be returned.public void setTargetBounds(Rectangle targetBounds)
The target bounds can be accessed with a call of getTargetBounds()
. If no bounds is
defined by a call of this method the annotation bounds will be used. The given target should be
in device coordinates.
targetBounds
- the target bounds to use or null
if the annotation bounds
should be usedpublic void render(Graphics2D target) throws JadiceException
Annotation
into the given Graphics2D
.render
in class AbstractRenderer
target
- the Graphics2D
to paint to.JadiceException
- will be thrown if the initialization or the rendering of the
Annotation
failed.Copyright © 2024 levigo holding gmbh. All rights reserved.