|
||||||||||
| 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.SlideShowBackground
public class SlideShowBackground
Paints and exchanges several images in the background.
Following CSS parameters are supported:
Copyright Enough Software 2008
| Field Summary |
|---|
| Fields inherited from class de.enough.polish.ui.Background |
|---|
borderWidth |
| Constructor Summary | |
|---|---|
SlideShowBackground(int color,
String imageUrls,
int anchor,
long interval)
Creates a new image background. |
|
SlideShowBackground(int color,
String imageUrls,
int anchor,
long interval,
int xOffset,
int yOffset)
Creates a new image background. |
|
| Method Summary | |
|---|---|
void |
animate(Screen screen,
Item parent,
long currentTime,
ClippingRegion repaintRegion)
Animates this background. |
Image |
getImage()
Retrieves the current image from this background. |
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. |
void |
setImage(Image image)
Sets the current image for this background. |
| Methods inherited from class de.enough.polish.ui.Background |
|---|
addRelativeToBackgroundRegion, animate, hideNotify, setStyle, showNotify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SlideShowBackground(int color,
String imageUrls,
int anchor,
long interval)
color - the background color or Item.TRANSPARENTimageUrls - comma separated list of image urls, e.g. "bg1.png,bg2.png,bg3.png"anchor - 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"interval - the interval in milliseconds before the next image is loaded
public SlideShowBackground(int color,
String imageUrls,
int anchor,
long interval,
int xOffset,
int yOffset)
color - the background color or Item.TRANSPARENTimageUrls - comma separated list of image urls, e.g. "bg1.png,bg2.png,bg3.png"anchor - 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"interval - the interval in milliseconds before the next image is loadedxOffset - 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 setImage(Image image)
image - the imagepublic Image getImage()
public void releaseResources()
releaseResources 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||