de.enough.polish.ui.backgrounds
Class CircleBackground

java.lang.Object
  extended by de.enough.polish.ui.Background
      extended by 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:

Copyright Enough Software 2004 - 2008

 history
        26-Jul-2004 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.ui.Background
borderWidth
 
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 de.enough.polish.ui.Background
addRelativeToBackgroundRegion, animate, animate, hideNotify, releaseResources, showNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.VCENTER
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

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 point
y - the vertical start point
width - the width of the background
height - the height of the background
g - the Graphics on which the background should be painted.