de.enough.polish.ui.backgrounds
Class GradientRadialBackground

java.lang.Object
  extended by de.enough.polish.ui.Background
      extended by de.enough.polish.ui.backgrounds.GradientRadialBackground
All Implemented Interfaces:
Serializable

public class GradientRadialBackground
extends Background

Generates a radial gradient from the inner-color to the outer-color.

Author:
Robert Virkus

Field Summary
 
Fields inherited from class de.enough.polish.ui.Background
borderWidth
 
Constructor Summary
GradientRadialBackground(int innerColor, int outerColor, int start, int end)
          Creates a new radial gradient background
GradientRadialBackground(int innerColor, int outerColor, int start, int end, int centerX, int centerY)
          Creates a new radial gradient 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

GradientRadialBackground

public GradientRadialBackground(int innerColor,
                                int outerColor,
                                int start,
                                int end)
Creates a new radial gradient background

Parameters:
innerColor - the color at the top of the gradient
outerColor - the color at the bottom of the gradient
start - the line counted from the top at which the gradient starts, either in pixels or in percent
end - the line counted from the top at which the gradient ends, either in pixels or in percent

GradientRadialBackground

public GradientRadialBackground(int innerColor,
                                int outerColor,
                                int start,
                                int end,
                                int centerX,
                                int centerY)
Creates a new radial gradient background

Parameters:
innerColor - the color at the top of the gradient
outerColor - the color at the bottom of the gradient
start - the line counted from the top at which the gradient starts, either in pixels or in percent
end - the line counted from the top at which the gradient ends, either in pixels or in percent
centerX - the horizontal center in percent. 0 is the center, -100 is the very left, +100 the very right
centerY - the vertical center in percent. 0 is the center, -100 is the very top, +100 the very bottom
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.