de.enough.polish.ui.backgrounds
Class FadeInBackground

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

public class FadeInBackground
extends Background

Fades in the background from fully transparent to the target color, which might also be translucent.

This background is only available when the target device supports MIDP 2.0

Copyright (c) Enough Software 2005 - 2008

 history
        22-Aug-2005 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.ui.Background
borderWidth
 
Constructor Summary
FadeInBackground(int targetArgbColor, boolean restartOnTime, boolean restartOnShowNotify)
          Creates a new fade-in background
 
Method Summary
 boolean animate()
          Animates this background.
 void paint(int x, int y, int width, int height, javax.microedition.lcdui.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FadeInBackground

public FadeInBackground(int targetArgbColor,
                        boolean restartOnTime,
                        boolean restartOnShowNotify)
Creates a new fade-in background

Parameters:
targetArgbColor - the target color
restartOnTime - true when the animation should restart after 5 seconds in showNotify
restartOnShowNotify - true when the animation should be restarted every time showNotify is called
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.

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