|
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 playerMethod Detail |
protected void initComponent()
Component
initComponent
in class Component
protected void deinitialize()
Component
deinitialize
in class Component
public void paint(Graphics g)
Component
paint
in interface Animated
paint
in class Component
g
- the component graphicsprotected void paintBackground(Graphics g)
Component
paintBackground
in class Component
g
- the component graphicspublic void paintBackgrounds(Graphics g)
Component
paintBackgrounds
in class Component
g
- the graphics objectprotected Dimension calcPreferredSize()
Component
calcPreferredSize
in class Component
public 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.lwuit.geom.Dimension)
public void setHeight(int height)
Component
setHeight
in class Component
height
- the height of the componentComponent.getHeight()
,
Component.setPreferredSize(com.sun.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.0 12-Dec-2008 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |