de.enough.polish.ui.backgrounds
Class VerticalSplitBackground

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

public class VerticalSplitBackground
extends Background

Creates a rectangular background with two colors.

Copyright Enough Software 2008

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.ui.Background
borderWidth
 
Constructor Summary
VerticalSplitBackground(int topColor, int bottomColor, int splitPos)
          Creates a new background
 
Method Summary
 void paint(int x, int y, int width, int height, Graphics g)
          Paints this background.
 void setStyle(Style style)
          Allows backgrounds to be animated using CSS attribute animations.
 
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

VerticalSplitBackground

public VerticalSplitBackground(int topColor,
                               int bottomColor,
                               int splitPos)
Creates a new background

Parameters:
topColor - the top color
bottomColor - the bottom color
splitPos - the split position either in percent (0 - 100) or in pixels, negative values are interpreted as percent values
Method Detail

paint

public void paint(int x,
                  int y,
                  int width,
                  int height,
                  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.

setStyle

public void setStyle(Style style)
Description copied from class: Background
Allows backgrounds to be animated using CSS attribute animations.

Overrides:
setStyle in class Background
Parameters:
style - the style containing typically only one element