|
Java DTV API 1.0 12-Dec-2008 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.lwuit.Component
com.sun.lwuit.MediaComponent
A component allowing us to embed and control rich media content.
| Field Summary |
| Fields inherited from class com.sun.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 | |
protected Dimension |
calcPreferredSize()
Calculates the preferred size based on component content. |
protected void |
deinitialize()
Invoked to indicate that the component initialization is being reversed since the component was detached from the container hierarchy. |
protected void |
initComponent()
Allows subclasses to bind functionality that relies on fully initialized and "ready for action" component state. |
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. |
protected void |
paintBackground(Graphics g)
Paints the background of the component, invoked with the clipping region and appropriate scroll translation. |
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 player| Method Detail |
protected void initComponent()
Component
initComponent in class Componentprotected void deinitialize()
Component
deinitialize in class Componentpublic void paint(Graphics g)
Component
paint in interface Animatedpaint in class Componentg - the component graphicsprotected void paintBackground(Graphics g)
Component
paintBackground in class Componentg - the component graphicspublic void paintBackgrounds(Graphics g)
Component
paintBackgrounds in class Componentg - the graphics objectprotected Dimension calcPreferredSize()
Component
calcPreferredSize in class Componentpublic void setX(int x)
Component
setX in class Componentx - the current x coordinate of the components originComponent.getX()public void setY(int y)
Component
setY in class Componenty - the current y coordinate of the components originComponent.getY()public void setWidth(int width)
Component
setWidth in class Componentwidth - the width of the componentComponent.getWidth(),
Component.setPreferredSize(com.sun.lwuit.geom.Dimension)public void setHeight(int height)
Component
setHeight in class Componentheight - the height of the componentComponent.getHeight(),
Component.setPreferredSize(com.sun.lwuit.geom.Dimension)public void setVisible(boolean visible)
setVisible in class Componentvisible - true to display, false to hide
public void startMedia()
throws MediaException
MediaException - if starting media fails
public void stopMedia()
throws MediaException
MediaException - if stopping media fails
|
Java DTV API 1.0 12-Dec-2008 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||