de.enough.polish.ui.backgrounds
Class PartialSimpleBackground

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

public class PartialSimpleBackground
extends Background

Provides a partial background - this background will be usually used within a combined background.

 backgrounds {
        partialTop {
                type: partial;
                start: 0%;
                end: 20%;
                color: white;
  }
        partialBottom {
                type: partial;
                start: 20%;
                end: 100%;
                color: blue;
  }
 }
 .myForm {
        background {
    type: combined;
    foreground: partialTop;
    background: partialBottom;
  }
 }
 

Copyright Enough Software 2007 - 2008

 history
        Dec 28, 2007 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.ui.Background
borderWidth
 
Constructor Summary
PartialSimpleBackground(int color, int start, int end)
          Creates a new 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

PartialSimpleBackground

public PartialSimpleBackground(int color,
                               int start,
                               int end)
Creates a new gradient background

Parameters:
color - the color
start - the line counted from the top at which the gradient starts in percent
end - the line counted from the top at which the gradient ends 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.