|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.ui.TextEffect
de.enough.polish.ui.texteffects.SmileyTextEffect
public class SmileyTextEffect
Renders textual smileys with images.
Activate the smiley text effect by specifying text-effect: smiley; in your polish.css file.
Copyright (c) 2007 Enough Software
history
16-July-2007 - Andre creation
| Nested Class Summary | |
|---|---|
class |
SmileyTextEffect.Smiley
|
| Field Summary | |
|---|---|
protected java.lang.String |
currentSmiley
|
static SmileyTextEffect.Smiley[] |
smileyList
|
protected java.util.Hashtable |
smileyMap
|
| Fields inherited from class de.enough.polish.ui.TextEffect |
|---|
style |
| Constructor Summary | |
|---|---|
SmileyTextEffect()
Creates a text with smileys |
|
| Method Summary | |
|---|---|
void |
drawString(java.lang.String text,
int textColor,
int x,
int y,
int orientation,
javax.microedition.lcdui.Graphics g)
Paints the text and applies the text effect. |
int |
getFontHeight()
Retrieves the font height by default. |
protected int |
getSmiley(java.lang.String line)
|
protected void |
init()
|
int |
stringWidth(java.lang.String str)
Calculates the width of the given text. |
java.lang.String[] |
wrap(java.lang.String text,
javax.microedition.lcdui.Font font,
int firstLineWidth,
int lineWidth)
Wraps the text into several lines. |
void |
wrap(java.lang.String value,
javax.microedition.lcdui.Font font,
int completeWidth,
int firstLineWidth,
int lineWidth,
ArrayList list)
|
| Methods inherited from class de.enough.polish.ui.TextEffect |
|---|
animate, animate, drawStrings, getFont, getLeftX, getRgbData, getRgbData, getRgbData, getTopY, getTopY, hideNotify, releaseResources, setStyle, showNotify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static SmileyTextEffect.Smiley[] smileyList
protected java.util.Hashtable smileyMap
protected java.lang.String currentSmiley
| Constructor Detail |
|---|
public SmileyTextEffect()
| Method Detail |
|---|
protected void init()
public int stringWidth(java.lang.String str)
TextEffect
stringWidth in class TextEffectstr - the text of which the width should be determined
public int getFontHeight()
TextEffect
getFontHeight in class TextEffect
public java.lang.String[] wrap(java.lang.String text,
javax.microedition.lcdui.Font font,
int firstLineWidth,
int lineWidth)
TextEffect
wrap in class TextEffecttext - the textfont - used fontfirstLineWidth - width of the first linelineWidth - width of following lines
public void wrap(java.lang.String value,
javax.microedition.lcdui.Font font,
int completeWidth,
int firstLineWidth,
int lineWidth,
ArrayList list)
public void drawString(java.lang.String text,
int textColor,
int x,
int y,
int orientation,
javax.microedition.lcdui.Graphics g)
TextEffect
drawString in class TextEffecttext - the texttextColor - the color of the textx - x coordinatey - y coordinateorientation - the orientation, e.g. Graphics.TOP | Graphics.LEFT or Graphics.TOP | Graphics.HCENTERg - the graphics contextprotected int getSmiley(java.lang.String line)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||