Interface DrawableRenderer<G>
- All Superinterfaces:
Cloneable
A renderer that can render a visual representation onto a target.
-
Method Summary
Modifier and TypeMethodDescriptionclone()
getAttribute
(String name) Allows the user to retrieve specific attributes on the underlying implementation.boolean
hasAttribute
(String name) void
render
(G target, AffineTransform transform, Drawable drawable, Rectangle bounds, MTLanguage currentLanguage, MTColorTransformer colorTransformer, Paint borderPaint, Stroke borderStroke, Paint textPaint) Renders a drawable to a target.void
setAttribute
(String name, Object value) Allows the user to set specific attributes on the underlying implementation.
-
Method Details
-
setAttribute
Allows the user to set specific attributes on the underlying implementation.- Parameters:
name
- The name of the attribute.value
- The value of the attribute.- Throws:
IllegalArgumentException
- thrown if the underlying implementation doesn't recognize the attribute.
-
getAttribute
Allows the user to retrieve specific attributes on the underlying implementation.- Parameters:
name
- The name of the attribute.- Returns:
- value The value of the attribute.
- Throws:
IllegalArgumentException
- thrown if the underlying implementation doesn't recognize the attribute.
-
hasAttribute
-
render
void render(G target, AffineTransform transform, Drawable drawable, Rectangle bounds, MTLanguage currentLanguage, MTColorTransformer colorTransformer, Paint borderPaint, Stroke borderStroke, Paint textPaint) Renders a drawable to a target.- Parameters:
target
- The target to render to.transform
- The transform.drawable
- The drawable to render.bounds
- The bounds to render the drawable to.currentLanguage
- The current language used when rendering.colorTransformer
- A color transformer that transforms the FILL and STROKE colors returned by the drawable where @code{isPaintTransformable(FILL, index) == true} and @code{isPaintTransformable(STROKE, index) == true} respectively. If null the paints returned by the drawable is used. The exception is when @code{isBorder(index) == true}, in which case the transformer will not be used.borderPaint
- The stroke paint used ifisPaintTransformable(PaintMode.STROKE, index) == true && isBorder(index) == true
. Ifnull
then the stroke paint returned by the drawable is used.borderStroke
- The stroke used ifisBorder(index) == true
. If @code{null} then the stroke returned by the drawable is used.textPaint
- The text paint used ifisPaintTransformable(PaintMode.TEXT, index) == true
. Ifnull
then the text paint returned by the drawable is used.
-
clone
- Throws:
CloneNotSupportedException
-