|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.dtv.lwuit.Component
com.sun.dtv.lwuit.MediaComponent
public class MediaComponent
A component allowing us to embed and control rich media content.
Field Summary |
---|
Fields inherited from class com.sun.dtv.lwuit.Component |
---|
BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, LEFT, RIGHT, TOP |
Fields inherited from interface com.sun.dtv.ui.Animated |
---|
ALTERNATING, LOOP, REPEATING |
Constructor Summary | |
---|---|
MediaComponent(Player player)
Creates a new instance of MediaComponent. |
Method Summary | |
---|---|
void |
paint(Graphics g)
This method paints the Component on the screen, it should be overriden by subclasses to perform custom drawing or invoke the UI API's to let the PLAF perform the rendering. |
void |
paintBackgrounds(Graphics g)
This method paints all the parents Components Background. |
void |
setHeight(int height)
Sets the Component height, this method is exposed for the purpose of external layout managers and should not be invoked directly. |
void |
setVisible(boolean visible)
Display the embedded media component. |
void |
setWidth(int width)
Sets the Component width, this method is exposed for the purpose of external layout managers and should not be invoked directly. |
void |
setX(int x)
Sets the Component x location relative to the parent container, this method is exposed for the purpose of external layout managers and should not be invoked directly. |
void |
setY(int y)
Sets the Component y location relative to the parent container, this method is exposed for the purpose of external layout managers and should not be invoked directly. |
void |
startMedia()
Start media playback implicitly setting the component to visible. |
void |
stopMedia()
Stop media playback. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MediaComponent(Player player)
player
- the media playerMethod Detail |
---|
public void paint(Graphics g)
Component
paint
in interface Animation
paint
in class Component
g
- the component graphicspublic void paintBackgrounds(Graphics g)
Component
paintBackgrounds
in class Component
g
- the graphics objectpublic void setX(int x)
Component
setX
in class Component
x
- the current x coordinate of the components originComponent.getX()
public void setY(int y)
Component
setY
in class Component
y
- the current y coordinate of the components originComponent.getY()
public void setWidth(int width)
Component
setWidth
in class Component
width
- the width of the componentComponent.getWidth()
,
Component.setPreferredSize(com.sun.dtv.lwuit.geom.Dimension)
public void setHeight(int height)
Component
setHeight
in class Component
height
- the height of the componentComponent.getHeight()
,
Component.setPreferredSize(com.sun.dtv.lwuit.geom.Dimension)
public void setVisible(boolean visible)
setVisible
in class Component
visible
- true to display, false to hidepublic void startMedia() throws MediaException
MediaException
- if starting media failspublic void stopMedia() throws MediaException
MediaException
- if stopping media fails
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |