de.enough.polish.ui.backgrounds
Class BorderedRoundRectOpeningBackground

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

public class BorderedRoundRectOpeningBackground
extends Background

Draws an expanding backround which will show a border when it is fully expanded.

Copyright Enough Software 2004 - 2009

 history
        09-Nov-2004 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.ui.Background
borderWidth
 
Constructor Summary
BorderedRoundRectOpeningBackground(int color, int startHeight, int speed, int arcWidth, int arcHeight, int borderColor, int borderWidth)
          Creates a new opening background.
 
Method Summary
 boolean animate()
          Animates this background.
 void paint(int x, int y, int width, int height, Graphics g)
          Paints this background.
 void showNotify()
          Informs the background that it is being shown shortly or that it is now applied to a new visible item.
 
Methods inherited from class de.enough.polish.ui.Background
addRelativeToBackgroundRegion, animate, hideNotify, releaseResources, setStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BorderedRoundRectOpeningBackground

public BorderedRoundRectOpeningBackground(int color,
                                          int startHeight,
                                          int speed,
                                          int arcWidth,
                                          int arcHeight,
                                          int borderColor,
                                          int borderWidth)
Creates a new opening background.

Parameters:
color - the color of the background.
startHeight - the start height, default is 1
speed - the constant speed in of pixels by which the background-height should be increased at each animation-step, use -1 to accelerate
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,
                  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.

animate

public boolean animate()
Description copied from class: Background
Animates this background. Subclasses can override this method to create animations.

Overrides:
animate in class Background
Returns:
true when this background has been animated.
See Also:
Background.animate(Screen, Item, long, ClippingRegion)

showNotify

public void showNotify()
Description copied from class: Background
Informs the background that it is being shown shortly or that it is now applied to a new visible item. The default implementation is empty.

Overrides:
showNotify in class Background