de.enough.polish.ui.backgrounds
Class DoubleGradientVerticalBackground

java.lang.Object
  extended by de.enough.polish.ui.Background
      extended by de.enough.polish.ui.backgrounds.DoubleGradientVerticalBackground
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
RoundRectDoubleGradientVerticalBackground

public class DoubleGradientVerticalBackground
extends Background

DoubleGradientVerticalBackground generates an nice Backgroundscreen, with two gradients, each taking half of the available height.

Copyright Enough Software 2007 - 2008

Author:
Andre Schmidt

Field Summary
 
Fields inherited from class de.enough.polish.ui.Background
borderWidth
 
Constructor Summary
DoubleGradientVerticalBackground(int firstTopColor, int firstBottomColor, int secondTopColor, int secondBottomColor, int stroke)
          Creates a new double gradient background
DoubleGradientVerticalBackground(int firstTopColor, int firstBottomColor, int secondTopColor, int secondBottomColor, int stroke, int start, int end, boolean isPercent)
          Creates a new double 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

DoubleGradientVerticalBackground

public DoubleGradientVerticalBackground(int firstTopColor,
                                        int firstBottomColor,
                                        int secondTopColor,
                                        int secondBottomColor,
                                        int stroke)
Creates a new double gradient background

Parameters:
firstTopColor - the color at the top of the first gradient
firstBottomColor - the color at the bottom of the first gradient
secondTopColor - the color at the top of the second gradient
secondBottomColor - the color at the bottom of the second gradient
stroke - the line stroke style

DoubleGradientVerticalBackground

public DoubleGradientVerticalBackground(int firstTopColor,
                                        int firstBottomColor,
                                        int secondTopColor,
                                        int secondBottomColor,
                                        int stroke,
                                        int start,
                                        int end,
                                        boolean isPercent)
Creates a new double gradient background

Parameters:
firstTopColor - the color at the top of the first gradient
firstBottomColor - the color at the bottom of the first gradient
secondTopColor - the color at the top of the second gradient
secondBottomColor - the color at the bottom of the second gradient
stroke - the line stroke style
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
isPercent - true when the start and end settings should be counted in percent
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.