de.enough.polish.ui.backgrounds
Class CircleBackground
java.lang.Object
de.enough.polish.ui.Background
de.enough.polish.ui.backgrounds.CircleBackground
- All Implemented Interfaces:
- Serializable
public class CircleBackground
- extends Background
Paints a circular or elliptical background.
Following CSS-attributes are supported:
- type: the type of the background, needs to be "circle".
- color: the color of the background, defaults to "white".
- diameter: the diameter of the background, when defined
always a circle will be painted.
Copyright Enough Software 2004 - 2008
history
26-Jul-2004 - rob creation
- Author:
- Robert Virkus, j2mepolish@enough.de
|
Constructor Summary |
CircleBackground(int color,
int diameter,
int anchor,
int xOffset,
int yOffset)
Creates a new circle background. |
|
Method Summary |
void |
paint(int x,
int y,
int width,
int height,
javax.microedition.lcdui.Graphics g)
Paints this background. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CircleBackground
public CircleBackground(int color,
int diameter,
int anchor,
int xOffset,
int yOffset)
- Creates a new circle background.
- Parameters:
color - the color of the background.diameter - the diameter of the background in pixels (positive numbers) or percent (negative numbers), when -1 this will
be ignored, otherwise this will result in a centered circle
(instead of an ellipse).anchor - the anchor of the background, e.g. Graphics.RIGHT | Graphics.VCENTERxOffset - 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.
paint
public void paint(int x,
int y,
int width,
int height,
javax.microedition.lcdui.Graphics g)
- Description copied from class:
Background
- Paints this background.
- Specified by:
paint in class Background
- Parameters:
x - 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.