com.jgoodies.animation.renderer
Class AbstractTextRenderer
java.lang.Object
com.jgoodies.animation.renderer.AbstractTextRenderer
- AnimationRenderer
public abstract class AbstractTextRenderer
extends java.lang.Object
An abstract superclass that helps implementing typographic animation renderers.
cachedGlyphShapes
protected Shape[] cachedGlyphShapes
cachedGlyphVector
protected GlyphVector cachedGlyphVector
cachedTextAscent
protected float cachedTextAscent
cachedTextHeight
protected float cachedTextHeight
cachedTextWidth
protected float cachedTextWidth
capitalMAscent
protected float capitalMAscent
ensureValidCache
protected void ensureValidCache(Graphics2D g2)
getAdjustedAscent
protected float getAdjustedAscent()
Computes and answers the text ascent using the current height mode.
- the ascent adjusted using the current height mode
getAdjustedDescent
protected float getAdjustedDescent()
Computes and answers the text descent using the current height mode.
- the descent adjusted to the current height mode
getColor
public Color getColor()
getFont
public Font getFont()
getText
public String getText()
invalidateCache
protected void invalidateCache()
Invalidates the cache.
isCacheValid
protected boolean isCacheValid()
setCacheValid
protected void setCacheValid(boolean b)
setColor
public void setColor(Color color)
setFont
public void setFont(Font newFont)
Sets the renderer's font.
newFont
- the font to be set
setHeightMode
public void setHeightMode(HeightMode heightMode)
setText
public void setText(String newText)
Sets the renderer's text.
newText
- the text to be set
validateCache
protected void validateCache(Graphics2D g2)
Validates the cache, here: creates a GlyphVector
and computes and stores its size information.
g2
- the Graphics object used to get the font render context
Copyright © 2001-2006 JGoodies Karsten Lentzsch. All Rights Reserved.