de.enough.polish.ui.texteffects
Class TypeWriterTextEffect

java.lang.Object
  extended by de.enough.polish.ui.TextEffect
      extended by de.enough.polish.ui.texteffects.TypeWriterTextEffect
All Implemented Interfaces:
Serializable

public class TypeWriterTextEffect
extends TextEffect

Writes one character after the other.

Activate the shadow text effect by specifying text-effect: typewriter; in your polish.css file.

Copyright (c) Enough Software 2005 - 2008

 history
        16-Nov-2005 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.ui.TextEffect
style
 
Constructor Summary
TypeWriterTextEffect()
          Creates a new type writer effect.
 
Method Summary
 boolean animate()
          Animates this effect.
 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.
 void hideNotify()
          Notifies this effect that the corresponding item is to be hidden.
 
Methods inherited from class de.enough.polish.ui.TextEffect
animate, drawStrings, getFont, getFontHeight, getLeftX, getRgbData, getRgbData, getRgbData, getTopY, getTopY, releaseResources, setStyle, showNotify, stringWidth, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeWriterTextEffect

public TypeWriterTextEffect()
Creates a new type writer effect.

Method Detail

animate

public boolean animate()
Description copied from class: TextEffect
Animates this effect. Subclasses can override this method to create animations.

Overrides:
animate in class TextEffect
Returns:
true when this effect has been animated.

hideNotify

public void hideNotify()
Description copied from class: TextEffect
Notifies this effect that the corresponding item is to be hidden. The default implementation is empty.

Overrides:
hideNotify in class TextEffect

drawString

public void drawString(java.lang.String text,
                       int textColor,
                       int x,
                       int y,
                       int orientation,
                       javax.microedition.lcdui.Graphics g)
Description copied from class: TextEffect
Paints the text and applies the text effect.

Specified by:
drawString in class TextEffect
Parameters:
text - the text
textColor - the color of the text
x - x coordinate
y - y coordinate
orientation - the orientation, e.g. Graphics.TOP | Graphics.LEFT or Graphics.TOP | Graphics.HCENTER
g - the graphics context