de.enough.polish.ui.texteffects
Class ShadowTextEffect

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

public class ShadowTextEffect
extends TextEffect

Paints a shadow behind a text.

Activate the shadow text effect by specifying text-effect: shadow; in your polish.css file. You can finetune the effect with following attributes:

Copyright (c) Enough Software 2005 - 2008

 history
        16-Nov-2005 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
static int ORIENTATION_BOTTOM
           
static int ORIENTATION_BOTTOM_LEFT
           
static int ORIENTATION_BOTTOM_RIGHT
           
static int ORIENTATION_LEFT
           
static int ORIENTATION_RIGHT
           
static int ORIENTATION_TOP
           
static int ORIENTATION_TOP_LEFT
           
static int ORIENTATION_TOP_RIGHT
           
 int shadowColor
           
 int xOffset
           
 int yOffset
           
 
Fields inherited from class de.enough.polish.ui.TextEffect
style
 
Constructor Summary
ShadowTextEffect()
          Creates a shadow effect.
ShadowTextEffect(int shadowColor, int xOffset, int yOffset)
          Creates a shadow effect.
 
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.
 void setStyle(Style style)
          Sets the style of this item.
 
Methods inherited from class de.enough.polish.ui.TextEffect
animate, animate, drawStrings, getFont, getFontHeight, getLeftX, getRgbData, getRgbData, getRgbData, getTopY, getTopY, hideNotify, releaseResources, showNotify, stringWidth, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORIENTATION_BOTTOM_RIGHT

public static final int ORIENTATION_BOTTOM_RIGHT
See Also:
Constant Field Values

ORIENTATION_BOTTOM_LEFT

public static final int ORIENTATION_BOTTOM_LEFT
See Also:
Constant Field Values

ORIENTATION_TOP_RIGHT

public static final int ORIENTATION_TOP_RIGHT
See Also:
Constant Field Values

ORIENTATION_TOP_LEFT

public static final int ORIENTATION_TOP_LEFT
See Also:
Constant Field Values

ORIENTATION_BOTTOM

public static final int ORIENTATION_BOTTOM
See Also:
Constant Field Values

ORIENTATION_TOP

public static final int ORIENTATION_TOP
See Also:
Constant Field Values

ORIENTATION_RIGHT

public static final int ORIENTATION_RIGHT
See Also:
Constant Field Values

ORIENTATION_LEFT

public static final int ORIENTATION_LEFT
See Also:
Constant Field Values

shadowColor

public int shadowColor

xOffset

public int xOffset

yOffset

public int yOffset
Constructor Detail

ShadowTextEffect

public ShadowTextEffect()
Creates a shadow effect.


ShadowTextEffect

public ShadowTextEffect(int shadowColor,
                        int xOffset,
                        int yOffset)
Creates a shadow effect.

Parameters:
shadowColor - the color
xOffset - the xOffset
yOffset - the yOffset
Method Detail

setStyle

public void setStyle(Style style)
Description copied from class: TextEffect
Sets the style of this item. Subclasses can override this method for getting specific settings.

Overrides:
setStyle in class TextEffect
Parameters:
style - the new style for this item.

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