de.enough.polish.ui.backgrounds
Class VideoBackground

java.lang.Object
  extended by de.enough.polish.ui.Background
      extended by de.enough.polish.ui.backgrounds.VideoBackground
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AnimatedGifBackground

public class VideoBackground
extends Background

Plays a video in an background.

Note that you can use this background only when you target device supports the MMAPI 1.1 or higher.

Copyright Enough Software 2007 - 2009

 history
        Nov 8, 2007 - rob creation
 

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
 
Fields inherited from class de.enough.polish.ui.Background
borderWidth
 
Constructor Summary
VideoBackground(int color, String url, String mimeType, int loopCount, int anchor, int xOffset, int yOffset)
           
 
Method Summary
 void hideNotify()
          Informs the background that it is being hidden shortly.
 void paint(int x, int y, int width, int height, Graphics g)
          Paints this background.
 void releaseResources()
          Releases all (memory intensive) resources such as images or RGB arrays of 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, animate, setStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VideoBackground

public VideoBackground(int color,
                       String url,
                       String mimeType,
                       int loopCount,
                       int anchor,
                       int xOffset,
                       int yOffset)
Parameters:
color -
url -
mimeType -
loopCount -
anchor -
xOffset -
yOffset -
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.

releaseResources

public void releaseResources()
Description copied from class: Background
Releases all (memory intensive) resources such as images or RGB arrays of this background. The default implementation does not do anything.

Overrides:
releaseResources in class Background

hideNotify

public void hideNotify()
Description copied from class: Background
Informs the background that it is being hidden shortly. The default implementation is empty.

Overrides:
hideNotify in class Background

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