com.mamarce.mhp.mf.components
Class MBackground

java.lang.Object
  extended by com.mamarce.mhp.mf.components.MBackground
All Implemented Interfaces:
org.davic.resources.ResourceClient

public final class MBackground
extends java.lang.Object
implements org.davic.resources.ResourceClient

Title : MBackground.java . Copyright: Copyright (c) 2005 Company: www.mamarce.come.come.com

Version:
1.0
Author:
frattallone

Method Summary
 void displayBgImage()
          Dysplay The image previously set.
static MBackground getInstance(javax.tv.xlet.XletContext xletContext)
          Gets an instace of MBackground.
 void hideVideo()
          Hides Video Layer.
 void notifyRelease(org.davic.resources.ResourceProxy proxy)
           
 void release()
          Destroys this component.
 void release(org.davic.resources.ResourceProxy proxy)
           
 boolean requestRelease(org.davic.resources.ResourceProxy proxy, java.lang.Object object)
           
 void setBgImage(java.lang.String image)
          Sets the background image.
 void setSize(java.awt.Rectangle destination)
          Set the size of the VideoLayer.
 void setSize(java.awt.Rectangle source, java.awt.Rectangle destination)
          Set the size of the VideoLayer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MBackground getInstance(javax.tv.xlet.XletContext xletContext)
Gets an instace of MBackground.

Parameters:
xletContext - context for the application.
Returns:
cspBackground an instance of MBackground.

setBgImage

public void setBgImage(java.lang.String image)
Sets the background image.

Parameters:
image - image path.

displayBgImage

public void displayBgImage()
Dysplay The image previously set.


setSize

public void setSize(java.awt.Rectangle source,
                    java.awt.Rectangle destination)
Set the size of the VideoLayer. Parameters represents a transformation where the rectangle source in the source video is scaled and clipped to be within the rectangle destination. Calling one of the methods setSize() is necessary because the background image will not be visible behind the video.

Parameters:
source - The rectangle representing the portion of the source video to display, in the coordinate system of the screen.
destination - The rectangle representing where the video is to be displayed, in the coordinate system of the screen.

setSize

public void setSize(java.awt.Rectangle destination)
Set the size of the VideoLayer. Calling one of the methods setSize() is necessary because the background image will not be visible behind the video.

Parameters:
destination - The rectangle representing where the video is to be displayed, in the coordinate system of the screen.

hideVideo

public void hideVideo()
Hides Video Layer.


release

public void release()
Destroys this component.


requestRelease

public boolean requestRelease(org.davic.resources.ResourceProxy proxy,
                              java.lang.Object object)
Specified by:
requestRelease in interface org.davic.resources.ResourceClient

release

public void release(org.davic.resources.ResourceProxy proxy)
Specified by:
release in interface org.davic.resources.ResourceClient

notifyRelease

public void notifyRelease(org.davic.resources.ResourceProxy proxy)
Specified by:
notifyRelease in interface org.davic.resources.ResourceClient