|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.ui.Background
de.enough.polish.ui.backgrounds.TextBackground
public class TextBackground
Paints text in a background.
Following CSS parameters are supported:
Copyright Enough Software 2004 - 2009
history
14-Mar-2004 - rob creation
| Field Summary |
|---|
| Fields inherited from class de.enough.polish.ui.Background |
|---|
borderWidth |
| Constructor Summary | |
|---|---|
TextBackground(String text,
String textStyleName,
int color,
int anchor,
int xOffset,
int yOffset)
Creates a new image background. |
|
| Method Summary | |
|---|---|
void |
animate(Screen screen,
Item parent,
long currentTime,
ClippingRegion repaintRegion)
Animates this background. |
void |
hideNotify()
Informs the background that it is being hidden shortly. |
void |
paint(int x,
int y,
int width,
int height,
Graphics g)
Paints this background. |
void |
releaseResources()
Releases all (memory intensive) resources such as images or RGB arrays of this background. |
static void |
setLocalization(String original,
String translation)
Specifies a translations. |
void |
setStyle(Style style)
Allows backgrounds to be animated using CSS attribute animations. |
void |
showNotify()
Informs the background that it is being shown shortly or that it is now applied to a new visible item. |
| Methods inherited from class de.enough.polish.ui.Background |
|---|
addRelativeToBackgroundRegion, animate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextBackground(String text,
String textStyleName,
int color,
int anchor,
int xOffset,
int yOffset)
text - the texttextStyleName - name of style of the textcolor - the background color or Item.TRANSPARENTanchor - the anchor of the image, either "left", "right",
"center" (="horizontal-center"), "vertical-center", "top" or "bottom"
or any combinationof these values. Defaults to "horizontal-center | vertical-center"xOffset - The number of pixels to move the image horizontally, negative values move it to the left.yOffset - The number of pixels to move the image vertically, negative values move it to the top.| Method Detail |
|---|
public void paint(int x,
int y,
int width,
int height,
Graphics g)
Background
paint in class Backgroundx - the horizontal start pointy - the vertical start pointwidth - the width of the backgroundheight - the height of the backgroundg - the Graphics on which the background should be painted.public void releaseResources()
releaseResources in class Backgroundpublic void hideNotify()
Background
hideNotify in class Backgroundpublic void showNotify()
Background
showNotify in class Background
public void animate(Screen screen,
Item parent,
long currentTime,
ClippingRegion repaintRegion)
Background
animate in class Backgroundscreen - the parent screenparent - the parent item, can be null when the background belongs to a screencurrentTime - the current time in millisecondsrepaintRegion - the repaint area that needs to be updated when this item is animatedItem.addRelativeToContentRegion(ClippingRegion, int, int, int, int)public void setStyle(Style style)
Background
setStyle in class Backgroundstyle - the style containing typically only one element
public static void setLocalization(String original,
String translation)
original - the original texttranslation - the translation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||