|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.animation.renderer.AbstractTextRenderer
public abstract class AbstractTextRenderer
An abstract superclass that helps implementing typographic animation renderers.
Field Summary | |
---|---|
protected java.awt.Shape[] |
cachedGlyphShapes
|
protected java.awt.font.GlyphVector |
cachedGlyphVector
|
protected float |
cachedTextAscent
|
protected float |
cachedTextHeight
|
protected float |
cachedTextWidth
|
protected float |
capitalMAscent
|
Method Summary | |
---|---|
protected void |
ensureValidCache(java.awt.Graphics2D g2)
|
protected float |
getAdjustedAscent()
Computes and answers the text ascent using the current height mode. |
protected float |
getAdjustedDescent()
Computes and answers the text descent using the current height mode. |
java.awt.Color |
getColor()
|
java.awt.Font |
getFont()
|
HeightMode |
getHeightMode()
|
java.lang.String |
getText()
|
protected void |
invalidateCache()
Invalidates the cache. |
protected boolean |
isCacheValid()
|
protected void |
setCacheValid(boolean b)
|
void |
setColor(java.awt.Color color)
|
void |
setFont(java.awt.Font newFont)
Sets the renderer's font. |
void |
setHeightMode(HeightMode heightMode)
|
void |
setText(java.lang.String newText)
Sets the renderer's text. |
protected void |
validateCache(java.awt.Graphics2D g2)
Validates the cache, here: creates a GlyphVector
and computes and stores its size information. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.jgoodies.animation.AnimationRenderer |
---|
render |
Field Detail |
---|
protected java.awt.font.GlyphVector cachedGlyphVector
protected java.awt.Shape[] cachedGlyphShapes
protected float cachedTextWidth
protected float cachedTextAscent
protected float cachedTextHeight
protected float capitalMAscent
Method Detail |
---|
public java.awt.Color getColor()
public java.awt.Font getFont()
public java.lang.String getText()
public HeightMode getHeightMode()
public void setColor(java.awt.Color color)
public void setHeightMode(HeightMode heightMode)
public void setFont(java.awt.Font newFont)
newFont
- the font to be setpublic void setText(java.lang.String newText)
newText
- the text to be setprotected float getAdjustedAscent()
getHeightMode()
protected float getAdjustedDescent()
getHeightMode()
protected boolean isCacheValid()
protected void setCacheValid(boolean b)
protected void ensureValidCache(java.awt.Graphics2D g2)
protected void validateCache(java.awt.Graphics2D g2)
GlyphVector
and computes and stores its size information.
g2
- the Graphics object used to get the font render contextprotected void invalidateCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |