de.enough.polish.ui.backgrounds
Class ThinSimpleBackground

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

public class ThinSimpleBackground
extends Background

Renders a simple background with a maxium width.

Copyright Enough Software 2006 - 2009

 history
        Jul 29, 2006 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.ui.Background
borderWidth
 
Constructor Summary
ThinSimpleBackground(int color, int maxWidth, boolean isPercent, int borderWidth, int borderColor)
          Creates a new ThinSimpleBackground.
 
Method Summary
 void paint(int x, int y, int width, int height, Graphics g)
          Paints this background.
 
Methods inherited from class de.enough.polish.ui.Background
addRelativeToBackgroundRegion, animate, animate, hideNotify, releaseResources, setStyle, showNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThinSimpleBackground

public ThinSimpleBackground(int color,
                            int maxWidth,
                            boolean isPercent,
                            int borderWidth,
                            int borderColor)
Creates a new ThinSimpleBackground.

Parameters:
color - the color
maxWidth - the maxium width in either pixel or percent (0..100)
isPercent - true when the maxWidth parameter represents a percentage value
borderWidth - the width of the border
borderColor - the color of the border
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.