de.enough.polish.ui.backgrounds
Class BorderedSimpleBackground

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

public class BorderedSimpleBackground
extends Background

Paints a filled rectangle with a border around it as a background.

This background-type can save some memory and processing time, when used instead of the SimpleBackground and a SimpleBorder together.

Copyright Enough Software 2004 - 2008

Author:
Robert Virkus, robert@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.ui.Background
borderWidth
 
Constructor Summary
BorderedSimpleBackground(Color color, Color borderColor, int borderWidth)
          Creates a new simple background with a border.
BorderedSimpleBackground(int color, int borderColor, int borderWidth)
          Creates a new simple 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

BorderedSimpleBackground

public BorderedSimpleBackground(int color,
                                int borderColor,
                                int borderWidth)
Creates a new simple background with a border.

Parameters:
color - the color of the background
borderColor - the color of the border
borderWidth - the width of the border

BorderedSimpleBackground

public BorderedSimpleBackground(Color color,
                                Color borderColor,
                                int borderWidth)
Creates a new simple background with a border.

Parameters:
color - the color of the background
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.

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.