de.enough.polish.ui.backgrounds
Class RoundRectDoubleGradientVerticalBackground

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

public class RoundRectDoubleGradientVerticalBackground
extends DoubleGradientVerticalBackground

Paints a translucent rectangle with round corners as a background.

Copyright Enough Software 2007 - 2008

Author:
Robert Virkus, robert@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.ui.Background
borderWidth
 
Constructor Summary
RoundRectDoubleGradientVerticalBackground(int firstTopColor, int firstBottomColor, int secondTopColor, int secondBottomColor, int stroke, int start, int end, boolean isPercent, int arcWidth, int arcHeight, int borderColor, int borderWidth)
          Creates a new round rectangle background with a border.
 
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

RoundRectDoubleGradientVerticalBackground

public RoundRectDoubleGradientVerticalBackground(int firstTopColor,
                                                 int firstBottomColor,
                                                 int secondTopColor,
                                                 int secondBottomColor,
                                                 int stroke,
                                                 int start,
                                                 int end,
                                                 boolean isPercent,
                                                 int arcWidth,
                                                 int arcHeight,
                                                 int borderColor,
                                                 int borderWidth)
Creates a new round rectangle background with a border.

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
arcWidth - the horizontal diameter of the arc at the four corners
arcHeight - the vertical diameter of the arc at the four corners
borderColor - the color of the border
borderWidth - the width of the border
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.

Overrides:
paint in class DoubleGradientVerticalBackground
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.